Compare commits

...

596 Commits

Author SHA1 Message Date
Raymond Knopp
149034887c log reduction 2023-07-27 16:34:46 +02:00
Raymond Knopp
5917f0f2b8 initial synch : SSS threshold condition removed 2023-07-27 12:36:36 +02:00
Raymond Knopp
6832959b0b bugfix in command-line parameters 2023-07-26 21:09:54 +02:00
ue1
e7b42f419b Merge branch 'sl-eurecom' of https://gitlab.eurecom.fr/oai/openairinterface5g into sl-eurecom 2023-07-26 13:46:14 -04:00
ue1
d629498b98 testing sync-ref 2023-07-26 13:44:31 -04:00
Raymond Knopp
1c01343d49 Merge branch 'sl-eurecom' of https://gitlab.eurecom.fr/oai/openairinterface5g into sl-eurecom 2023-07-26 19:38:28 +02:00
Raymond Knopp
f633fc8d96 testing 2023-07-26 19:35:38 +02:00
Raymond Knopp
5e28985954 Merge branch 'sl-eurecom' of https://gitlab.eurecom.fr/oai/openairinterface5g into sl-eurecom 2023-07-26 13:28:00 -04:00
Raymond Knopp
af662183f4 debugging OTA 2023-07-26 13:25:14 -04:00
Raymond Knopp
efccb416cc command line parameter --sync-ref added again 2023-07-25 23:11:17 +02:00
Raymond Knopp
4232baec52 "synchronized" PSBCH simulation working now 2023-06-08 16:10:00 +02:00
Raymond Knopp
2f19c2de4d Modifications for SL-SSB. 2023-06-08 14:43:28 +02:00
Melissa Elkadi
b17e862742 Fixing build errors 2023-05-10 08:05:50 -07:00
Melissa
d680bb83b2 Merge branch 'develop' into 'episys-merge-develop-sl'
# Conflicts:
#   openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
2023-05-08 14:26:24 +00:00
Robert Schmidt
9354a45235 Merge branch 'integration_2023_w18b' into 'develop'
integration_2023_w18b

See merge request oai/openairinterface5g!2095

* !1879 NR RRC config improvements for multi UE scenario
* !2070 Use F1 internally: UE Context Setup
* !2073 Fix reconfigurationWithSync
* !2086 F1 Setup Request DUname is optional
* !2062 remove pdu session duplicated structs
* !2066 NR UE rework RRC MAC config
* !2075 bugfix in computing CCEs for DCI
* !2089 chore(build): adding docker support for rocky-linux
* !2091 Removal of "disableConcurrentBuilds" option from jenkinsfiles
* !2093 Modification of documentation for CI testbenches
2023-05-08 13:22:01 +00:00
Robert Schmidt
0b6ba9d08f Merge remote-tracking branch 'origin/ci-testbenches-doc' into integration_2023_w18b 2023-05-08 11:54:00 +02:00
Robert Schmidt
f5db0a881e Merge remote-tracking branch 'origin/ci-jenkinsfile-modifs' into integration_2023_w18b 2023-05-08 11:52:47 +02:00
Robert Schmidt
e7bf3b83a5 Merge remote-tracking branch 'origin/rocky-linux-support' into integration_2023_w18b 2023-05-08 11:52:28 +02:00
Robert Schmidt
b05d0ab91e Don't warn on unused function 2023-05-08 11:23:05 +02:00
Robert Schmidt
0894a6bfe7 Merge remote-tracking branch 'origin/NR_CCE_fix' into integration_2023_w18b 2023-05-06 05:23:18 +02:00
Robert Schmidt
462ed76114 Merge remote-tracking branch 'origin/NR_UE_rework_rrc_mac_config' into integration_2023_w18b 2023-05-06 05:21:10 +02:00
Melissa Elkadi
50923c7f80 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-05-05 10:51:22 -07:00
laurent
5cbd83c4e6 add macro for UINT32 2023-05-05 19:28:35 +02:00
Robert Schmidt
7fae9eb2d8 F1 UE context setup req: don't allocate memory we don't need 2023-05-05 18:22:38 +02:00
Robert Schmidt
5ee44e015a Merge remote-tracking branch 'origin/simplify-pdu-session-management' into integration_2023_w18b 2023-05-05 18:20:58 +02:00
Robert Schmidt
b2cc750587 Merge remote-tracking branch 'origin/fix-f1-duname' into integration_2023_w18b 2023-05-05 14:45:06 +02:00
Robert Schmidt
b90448ae20 Merge remote-tracking branch 'origin/fix-reconfigurationWithSync' into integration_2023_w18b 2023-05-05 14:44:52 +02:00
Robert Schmidt
719752cad8 Merge remote-tracking branch 'origin/int-f1-ue-ctxt-setup' into integration_2023_w18b 2023-05-05 14:44:40 +02:00
Laurent THOMAS
15e858270d Split big function, add an assert for non-IPv4 PDU sessions
Contributions by Robert Schmidt <robert.schmidt@openairinterface.org>
2023-05-05 14:35:02 +02:00
francescomani
9421fcc8b9 addressing review 2023-05-05 07:50:39 +02:00
francescomani
e9ded45428 bugfix in computing first cce 2023-05-05 07:36:39 +02:00
Robert Schmidt
c588facc1b Merge remote-tracking branch 'origin/NR_RRC_config_improvements_multi_UE' into integration_2023_w18b 2023-05-04 18:48:50 +02:00
Jaroslava Fiedlerova
5933f5ba53 CI:Modification of documentation for testbenches
- RAN-SA-AW2S-CN5G pipeline image - one antenna added to Amarisoft UE simulator, modification of the label
- resize of the images used in RAN-SA-AW2S-CN5G pipeline image
- change of the description for RAN-SA-AW2S-CN5G pipeline
- change of the description for RAN-LTE-TDD-2x2-Container pipeline, where nrmodule2 is used
- typo correction
2023-05-04 15:58:54 +02:00
Robert Schmidt
da2ba65685 Add new Interop-F1 pipeline documentation 2023-05-04 14:29:21 +02:00
Roberto Louro Magueta
8ba201005f Fix reconfigurationWithSync 2023-05-04 10:07:16 +01:00
Raphael Defosseux
f328a6e181 doc(docker): post-review changes
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2023-05-04 10:57:36 +02:00
Jaroslava Fiedlerova
bc68fcb32d Removal of "disableConcurrentBuilds" option from jenkinsfiles
- modification of jenkinfiles in order to enable parallel execution of the pipelines
2023-05-04 10:34:02 +02:00
Raphael Defosseux
b75d95626e chore(build): adding docker support for rocky-linux
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2023-05-04 10:27:11 +02:00
Robert Schmidt
375a11b119 Remove non-existing T1-Offload-Test pipeline from RAN-Container-Parent Jenkinsfile 2023-05-03 16:20:38 +02:00
Robert Schmidt
a990cba81f Add Interop-F1 pipeline to RAN-Container-Parent Jenkinsfile 2023-05-03 16:20:03 +02:00
Robert Schmidt
3ea2afdca5 Fix NSA: lock scheduler before removing UE 2023-05-03 16:12:45 +02:00
Robert Schmidt
3e282f9573 Add Accelleran-CU interoperability test 2023-05-03 13:40:22 +02:00
Robert Schmidt
8e30f99eee CI: docker-compose file for OAI DU with Accelleran CU 2023-05-03 13:40:22 +02:00
Robert Schmidt
3eea99a312 Add documentation for internal F1 interface 2023-05-03 13:40:22 +02:00
Robert Schmidt
67c7d52333 Default RRC Connection <-> no PDU sessions 2023-05-03 13:40:22 +02:00
Robert Schmidt
1eb4f857af UE Capabilities: we request during RRC Connection Setup, so no PDU sessions 2023-05-03 13:40:22 +02:00
Robert Schmidt
ca30b9ee55 Implement F1/split case for UE Context Setup 2023-05-03 13:40:22 +02:00
Robert Schmidt
6ced3cd8a7 Implementation for F1 UE Context Setup+Response in monolithic 2023-05-03 13:40:22 +02:00
Robert Schmidt
10b996f5db Stubs for F1 UE Context Setup Req+Resp messages 2023-05-03 13:40:22 +02:00
Robert Schmidt
31a1003349 Introduce mutex for MAC scheduler
Different threads (e.g., RRC, DU tasks) might access the scheduler at
the same time as the thread that drivers the scheduler itself
(ru_thread). To avoid data races, introduce this mutex.

Most functions of the scheduler are only used internally and have been
marked static in the previous commit. The remaining ones, in this
commit, either lock the scheduler mutex sched_lock, or a comment has
been added of the assumption of how such function is to be locked (e.g.,
if it might be called from different places, or if it is called by a
function that already locks the scheduler).
2023-05-03 13:40:22 +02:00
Robert Schmidt
44bf62758a Remove nr_mac_update_RA()
There is no point in updating RA, when we update the CellGroupConfig. We
simply drop this function, therefore
2023-05-03 13:40:22 +02:00
Robert Schmidt
e7a8eb950e NR MAC: make many functions static
To know which functions are used from outside and which are
module-local, make many functions static. This will allow us to protect
only those functions with a mutex for which it is necessary.
2023-05-03 13:40:20 +02:00
Robert Schmidt
2a0142fb96 Suppress any CellGroupConfig updates in F1
The CellGroupConfig should come from the DU. Currently, any update made
to the CellGroupConfig is done at CU. In split-operation, we have no way
of telling the DU about this update. Hence, in this commit, check if we
are in F1 split mode operation during a CellGroupConfig update, and if
so, suppress any updates to the CellGroupConfig, alongside a warning.
2023-05-03 13:38:25 +02:00
Robert Schmidt
6d7d075d8c Refactor NR MAC config: mark unimplemented functions as such 2023-05-03 13:38:24 +02:00
Robert Schmidt
f2a8b5c41d Remove wrong comment: SRBs are not handled via E1 2023-05-03 13:38:24 +02:00
Robert Schmidt
6cc01f7cd9 Merge branch 'integration_2023_w17' into 'develop'
integration_2023_w17

See merge request oai/openairinterface5g!2083

* !2045 ssb offset to point A harmonization
* !2068 Add mac_CellGroupConfig in RRCReconfiguration after a RRCReestablisment
* !2052 fix(ci): for old versions of iperf, server process shall be killed manually
* !2056 Generic changes related to UEs used in CI
* !2074 Fix of command for USRP B200 reset in CI pipeline
* !2014 transform global variables into const or static
* !2082 Change of the PLMN in AW2S pipeline
* !2078 Improve PRS Tutorial
* !2079 Update scope (Xforms, Qt) documentation and list in doc/README.md
2023-05-03 08:26:38 +00:00
Robert Schmidt
fc01032915 Merge remote-tracking branch 'origin/fix-nrqtscope-doc' into integration_2023_w17 2023-05-02 18:40:01 +02:00
Robert Schmidt
db00336a2a Merge remote-tracking branch 'origin/prsfix' into integration_2023_w17 2023-05-02 18:39:55 +02:00
Robert Schmidt
7223ac8c9a Merge remote-tracking branch 'origin/ci-aw2s-change-of-plmn' into integration_2023_w17 2023-05-02 18:39:50 +02:00
Robert Schmidt
a8879d3b9c Merge remote-tracking branch 'origin/remove-some-globales' into integration_2023_w17 2023-05-02 18:39:25 +02:00
Robert Schmidt
3fbcdf4c5a Merge remote-tracking branch 'origin/ci-fix-usrp-reboot-command' into integration_2023_w17 2023-05-02 18:39:17 +02:00
Robert Schmidt
d525849730 Merge remote-tracking branch 'origin/ci-generic-changes' into integration_2023_w17 2023-05-02 18:39:10 +02:00
Robert Schmidt
d9e38660ba Merge remote-tracking branch 'origin/ci-fix-iperf-zombie-process' into integration_2023_w17 2023-05-02 18:38:59 +02:00
Robert Schmidt
38ec30559e F1 Setup Request DUname is optional 2023-05-02 11:30:46 +02:00
Robert Schmidt
082cf6146d Merge remote-tracking branch 'origin/Fix_mac_CellGroupConfig_after_reestablishment' into integration_2023_w17 2023-04-28 16:37:21 +02:00
Dhanuja Elizabeth Thomas
149d27d55f Generic changes related to UEs used in CI 2023-04-28 16:35:09 +02:00
laurent
b339460666 cleanup only 2023-04-28 16:25:24 +02:00
Jaroslava Fiedlerova
787170de83 Change of the PLMN in AW2S pipeline 2023-04-28 16:04:35 +02:00
laurent
84fa481e72 remove pdu session duplicated structs 2023-04-28 15:55:12 +02:00
Raphael Defosseux
c126cbab77 fix(ci): Changes for debugging ssh connection issues faced while iperf/ping operations 2023-04-28 10:50:38 +02:00
Robert Schmidt
7cfb6db48a Update scope (Xforms, Qt) documentation and list in doc/README.md 2023-04-27 13:55:06 +02:00
Arash Sahbafard
bc0083c219 commit messages
There are some problems in the document that needs to be fixed.
	modified:   doc/RUN_NR_PRS.md
2023-04-26 17:37:06 +02:00
Melissa Elkadi
90e5db3728 Removing unnecessary changes to unit tests 2023-04-24 16:22:09 -07:00
Melissa Elkadi
c9bc86312f Merging in Adding new sidelink (SL) variables 2023-04-24 10:23:49 -07:00
Melissa Elkadi
7221a5f736 Some minor clean up 2023-04-24 10:07:43 -07:00
Melissa Elkadi
629b2c9fe3 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-04-24 09:59:13 -07:00
Melissa Elkadi
9f91dbd9bb Merge branch 'episys-merge-develop-sl' of https://gitlab.eurecom.fr/oai/openairinterface5g into episys-merge-develop-sl 2023-04-24 09:48:47 -07:00
Melissa Elkadi
a354ce01cf Updating SL TX side for PSS and SSS. Also propberly setting d_sss 2023-04-24 09:48:31 -07:00
Melissa Elkadi
93d32eca45 Updating SL TX side for PSS and SSS. Also propberly setting d_sss 2023-04-24 09:31:38 -07:00
rakesh mundlamuri
594fb18cc8 adressing the comments 2023-04-24 11:05:05 +02:00
rakesh mundlamuri
5143133d33 ssb offset to point A bugfix 2023-04-24 10:47:41 +02:00
francescomani
c0f7e458bb rework and adjust size of config_request mac vectors 2023-04-24 09:09:17 +02:00
francescomani
15822a0a5d rework nr_rrc_mac_config_req 2023-04-24 09:05:54 +02:00
Melissa Elkadi
053d8d938f Fixing PSBCHSIM for sidelink finally! 2023-04-21 17:09:44 -07:00
Melissa Elkadi
cf4a22b58a Fixing build failure 2023-04-21 16:40:28 -07:00
Melissa Elkadi
75e9db0633 More conversions 2023-04-21 16:38:43 -07:00
Melissa Elkadi
24bf0d8046 More conversions for int16_t to c16_t 2023-04-21 16:21:30 -07:00
Jaroslava Fiedlerova
3c5468dd7d Fix of command for USRP B200 reset in CI pipeline 2023-04-21 16:59:17 +02:00
Melissa Elkadi
d8627c91f3 Some more clean up to make review easier 2023-04-21 07:30:24 -07:00
Melissa Elkadi
ad8da84671 Fixing implicit declaration 2023-04-21 06:45:41 -07:00
Melissa Elkadi
f0f1121e9c Merge branch 'episys-merge-SL-variables' into episys-merge-develop-sl 2023-04-21 06:10:47 -07:00
luis_pereira87
ae6db92dc2 Add mac_CellGroupConfig in RRCReconfiguration after a RRCReestablisment to configure SR, BSR, TAG and PHR 2023-04-21 10:29:57 +01:00
Melissa Elkadi
9b8eae2256 Merge branch 'eurecom-develop' into episys-merge-SL-variables 2023-04-20 14:05:14 -07:00
Melissa Elkadi
e9e347043e Fixing typo and aligning input buffer 2023-04-18 11:09:15 -07:00
Melissa Elkadi
28741ed967 Reverting unnecessary CICD test change 2023-04-18 10:09:16 -07:00
Melissa Elkadi
608aa3ebc4 Adding 32 bit alignment to PSS variables 2023-04-18 09:59:51 -07:00
Melissa Elkadi
a6e18fe06a Merge branch 'eurecom-develop' into episys-merge-SL-variables 2023-04-18 09:29:56 -07:00
francescomani
b37b0e5c97 further improvements for PUCCH config 2023-04-17 16:22:22 +02:00
francescomani
28fb7a37d7 removing an assertion and improving CSI-RS config 2023-04-17 16:22:22 +02:00
Melissa Elkadi
aa6468f95e Merge branch 'eurecom-develop' into episys-merge-SL-variables 2023-04-10 13:45:19 -07:00
Melissa Elkadi
f09fffdb2b Whitespace and updating pss_search_time_nr() footprint 2023-04-06 10:05:48 -07:00
Melissa Elkadi
376a9beb80 Adding __attribute__((aligned(32))) back in 2023-04-04 15:02:56 -07:00
Melissa Elkadi
0b892acef3 Updating simulator and adding memsets 2023-04-04 07:25:38 -07:00
Melissa Elkadi
73907e5ee2 Re-adding clean-up and refactoing now that pbch works! 2023-04-03 19:34:59 -07:00
Melissa Elkadi
703047eca9 Fixing build errors 2023-04-03 17:28:40 -07:00
Melissa Elkadi
5cbad19d19 Temporarily removing refactoring in PSS until I can understand the sync problems 2023-04-03 10:41:40 -07:00
Melissa Elkadi
d1e1f56199 Merge branch 'eurecom-develop' into episys-merge-SL-variables 2023-04-03 05:35:06 -07:00
Melissa Elkadi
61435e9066 More clean up and use of c16_t's - but PBCH sync is failing 2023-03-31 08:40:35 -07:00
Melissa Elkadi
ee8af9dcfb Fixing seg fault and removing unused variables for PHY testing 2023-03-30 11:39:18 -07:00
Melissa Elkadi
b7f47aa70a Refactoring and more clean up 2023-03-29 12:34:52 -07:00
Melissa Elkadi
066de7c3c5 Removing primary_synchro_nr2_sl and others 2023-03-28 16:36:03 -07:00
Melissa Elkadi
fec2a15bdf Merge branch 'eurecom-develop' into episys-merge-SL-variables 2023-03-27 14:24:12 -07:00
Melissa Elkadi
8cbe4bb1d1 Adding softmodem_params() to prach and pucchsim
The get_softmodem_params() function needs to be added
to set the mode for sl_mode (or not). Several places
in the code will check this mode and it should be added
to ensure the proper code path is followed.
2023-03-24 14:34:14 -07:00
Melissa Elkadi
a54ca2c6e3 Slowly implementing sidelink changes.
Specifically, in this commit, we will begin to
implement the #define variables required for
synchronization. These variables include offset
and payload size values that vary from the Uu
interface, in relation to the PSS, SSS and PBCH
elements. We also introduce the new sl_mode
command line flag, which is used to switch between
the Uu interface and SL interface. This will allow
us to modify exisitng PSS and SSS functions, without
copying complete 5G functions and only changing
a few lines to support sidelink mode.

Fixing formatting for softmodem-common.h

Fixing formatting for softmodem-common.h
2023-03-24 10:55:09 -07:00
Melissa Elkadi
e79756d7ab Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-03-20 12:27:28 -07:00
Melissa Elkadi
39b73391d4 This commit fixing the rfsimualtor
There were three main issues with the simulator.
1. PSS_SSS_SUB_CARRIER_START was not properly used in Uu mode
2. phy_procedures_nrUE_TX(UE, proc, &phy_data) missing last arg
3. Premature free was added in the MAC layer by us for some reason.
2023-03-20 12:24:04 -07:00
Melissa Elkadi
784be9d241 Removing unnecessary changes 2023-03-16 17:48:21 -07:00
Melissa Elkadi
5d378b6416 Passing in local rxdataF to nr_slot_fep_init_sync then memcpy into global 2023-03-15 17:44:27 -07:00
Melissa Elkadi
b6e5b3594c Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-03-15 12:49:34 -07:00
Melissa Elkadi
f79ab7e087 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-03-15 06:37:38 -07:00
Melissa Elkadi
c6c004b8aa Getting rid of remaining warnings 2023-03-14 20:11:27 -07:00
Melissa Elkadi
2b193cded0 Reverting unnecessary changes 2023-03-14 19:02:17 -07:00
Melissa Elkadi
a07d4376d6 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-03-13 11:29:55 -07:00
Melissa Elkadi
2f23bf1ea4 Fixing botched build_oai merge 2023-03-10 09:16:38 -08:00
Melissa Elkadi
d8e92e93b3 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-03-09 11:09:17 -08:00
Melissa Elkadi
6db9c37e47 Fixing white space, and using c16_t in psbchsim 2023-03-09 05:43:19 -08:00
Melissa Elkadi
f596c6907a Reverting change to node_number initialization 2023-03-08 13:00:32 -08:00
Melissa Elkadi
d22d11d003 Fixing prachsim - get_softmodem_params was NULL 2023-03-08 12:25:02 -08:00
Melissa Elkadi
8bf5a0acf6 Using rxdataF in UE rather than local 2023-03-08 11:41:28 -08:00
Deokseong "David" Kim
95fc447472 Merge branch 'episys/ea/sidelink_frequency_update' into 'episys/master-sl'
Exploiting Sidelink carrier frequency for SL

See merge request aburger/openairinterface5g!185
2023-03-08 10:37:14 -08:00
Melissa Elkadi
5a61145948 Resolving all warning associated with c16_t conversion 2023-03-08 09:46:27 -08:00
Melissa Elkadi
751f06b15e Only preconfiguring SL for SL mode 2023-03-07 21:17:07 -08:00
David
98d5c1691c Adding NRUE_thread_SL back to nr_ue.c
Also, fixed all warning associated with switching
all global buffers on the NRUE side from int32_t to
c16_t
2023-03-06 17:01:41 -08:00
David
678e3f9a01 Merge branch 'develop' into episys-merge-develop-sl 2023-03-06 07:35:37 -08:00
Ejaz
ec1d5ead6a Only preconfigurating for SL in SL mode 2023-03-03 05:32:49 -08:00
David
7cbfbd6c92 Updating arg types in pss_sl_ch_est_nr 2023-03-02 14:23:46 -08:00
Melissa Elkadi
9338925b93 This commit is a large refactoring of UE_thread_sl
We chose to initially create our own (SL) version
of the UE_thread() function in the nr_ue.c. The original
function was then refactored and merged to the develop
branch. Now that it has been refactored, we have added
the UE SL support into the original function and removed
the UE_thread_sl function. This still needs to be validated
on the USRPs prior to merge. (It has been tested with RFSIM).

Also, a few more lingering warnings related to the int32_t -> c16_t
conversion
2023-03-01 14:14:28 -08:00
Melissa Elkadi
64b65cb5d9 Converting int16_t to c16_t struct 2023-03-01 09:18:22 -08:00
Melissa Elkadi
7b2d0dbf39 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-02-28 14:21:21 -08:00
Melissa Elkadi
ac4c4defd3 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-02-23 08:51:34 -08:00
Melissa Elkadi
816532d86c Removing PHY_SIDE_LINK definition 2023-02-23 08:31:14 -08:00
Melissa Elkadi
a96d727409 Merge branch 'episys-merge-develop-sl' of https://gitlab.eurecom.fr/oai/openairinterface5g into episys-merge-develop-sl 2023-02-23 08:29:06 -08:00
Melissa Elkadi
624fc5353e Forgot to update PSS_SEQ_OFFSET_SL - now it works 2023-02-23 08:19:53 -08:00
Melissa Elkadi
d609f3f5ae Removing PHY_SIDE_LINK variable and dependents 2023-02-23 06:57:53 -08:00
Melissa
bb525dc0ee Merge branch 'episys/sl_script_update_for_rfsim' into 'episys/master-sl'
Updated sidelink test script to include rfsim test.

See merge request aburger/openairinterface5g!188
2023-02-17 05:35:24 -08:00
Melissa Elkadi
1f432be612 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-02-15 05:44:45 -08:00
Melissa Elkadi
b47cb76977 Removing unused PSS and SSS tests as well as bw variable 2023-02-15 05:42:27 -08:00
Melissa Elkadi
528e1d99d2 Adding test cases for nr_psbchsim 2023-02-14 14:52:10 -08:00
Melissa Elkadi
aba645dc93 Removing unused/not working PSS and SSS tests 2023-02-14 06:33:27 -08:00
Melissa Elkadi
468e7330de Adding back in DPHY_SIDE_LINK 2023-02-13 12:44:40 -08:00
Melissa Elkadi
e7d04ec14f Adding definition for MIBSLCH 2023-02-13 10:15:47 -08:00
Melissa Elkadi
600399aa63 Fixing white space and removing unrelated changes 2023-02-13 08:56:04 -08:00
Melissa Elkadi
56b87424db Removing LTE HO changes 2023-02-13 08:42:34 -08:00
Melissa Elkadi
7a1928dfd0 Removing nFAPI LTE HO changes from this MR 2023-02-13 08:20:46 -08:00
Melissa Elkadi
6c8112581b Reverting LTE code (removing LTE HO changes from this MR) 2023-02-13 08:16:58 -08:00
Melissa Elkadi
7e473ca971 Reverting docker-compose to original 2023-02-13 08:06:48 -08:00
Melissa Elkadi
7f40b90ceb Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-02-13 07:59:48 -08:00
Melissa Elkadi
7feb6ed41f Merge branch 'episys/master-sl' into episys-merge-develop-sl 2023-02-09 07:37:18 -08:00
Melissa Elkadi
6fbb4df0a3 CMDLINE_PARAMS_CHECK_DESC must be correct
When merging in the new --nfapi str CL option from
develop, the santizer was catching a null pointer in
config_checkstr_assign_integer(). To fix this, I logged
params and i in config_execcheck(). This showed that
only 36 CMDLINE_PARAMS_CHECKs were happening when we
have 41 CL options in executables/softmodem-common.h.

To fix this, I added 7 more { .s5 = { NULL } }, for the
remaining CL parameters defined. Furthermore, the .s3a
CL parameter must be associated with the new --nfapi
string, so if it does not properly line up with the CL
definitions order, it will fail. The logs added in
config_execcheck() will show this.
2023-02-09 06:50:43 -08:00
Melissa
89f11abe68 Merge branch 'episys/gNB_tdd_config' into 'episys/master-sl'
Episys/gNB_tdd_config

See merge request aburger/openairinterface5g!183
2023-02-07 23:39:43 +00:00
Moein Sadeghi
3362fa991f Episys/gNB_tdd_config 2023-02-07 23:39:43 +00:00
Melissa Elkadi
3614c221c4 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-02-07 13:54:29 -08:00
Melissa Elkadi
298d822bd1 Merge branch 'episys/master-sl' into episys-merge-develop-sl 2023-02-07 13:14:57 -08:00
Melissa
6775b577fd Merge branch 'episys/david/counting_tx_sssb_in_tx_log' into 'episys/master-sl'
Adding Tx SSB count and measured RSRP value in the script.

See merge request aburger/openairinterface5g!180
2023-02-06 23:37:25 +00:00
David Kim
1283065946 Fixed delay time computation. 2023-02-06 15:02:16 -08:00
David Kim
50f4890faa Merge remote-tracking branch 'origin/episys/master-sl' into episys/david/counting_tx_sssb_in_tx_log 2023-02-06 10:16:29 -08:00
Melissa
03b75ed679 Merge branch 'episys/ea/sss_rsrp' into 'episys/master-sl'
Episys/ea/sss rsrp

See merge request aburger/openairinterface5g!182
2023-02-06 18:12:43 +00:00
Melissa
a91839e69c Episys/ea/sss rsrp 2023-02-06 18:12:43 +00:00
Melissa
2e34ab0190 Merge branch 'revert-a93da4a8' into 'episys/master-sl'
Revert "Merge branch 'episys/ea/sss_rsrp' into 'episys/master-sl'"

See merge request aburger/openairinterface5g!181
2023-02-06 18:09:11 +00:00
Melissa
e6abb12fb1 Revert "Merge branch 'episys/ea/sss_rsrp' into 'episys/master-sl'" 2023-02-06 18:09:11 +00:00
Melissa
a93da4a886 Merge branch 'episys/ea/sss_rsrp' into 'episys/master-sl'
Added RSRP calculation for SSB

See merge request aburger/openairinterface5g!179
2023-02-06 18:07:38 +00:00
Ejaz Ahmed
27e14a06c2 Added RSRP calculation for SSB 2023-02-06 18:07:38 +00:00
David Kim
028f92a3e2 Code cleanup. 2023-02-06 10:05:43 -08:00
David
bf6b8442f1 Added no-run option for log analysis only. 2023-02-03 12:55:21 -08:00
David
0f90a7c24c Added Sidelink SSB RSRP metric value in the script result. 2023-02-03 12:05:40 -08:00
David
0e84775e29 Merge branch 'episys/ea/sss_rsrp' into episys/david/counting_tx_sssb_in_tx_log 2023-02-02 16:17:42 -08:00
David
0e0fc7eab4 Counting the number tx Sidelink SSB for sync.
1. Parsed tx log file in case that SyncRef UE was found.
2. Counted the number of tx Sidelink SSB until sync.
3. Added average statistics for multiple iternations.
2023-02-02 15:17:31 -08:00
Ejaz
323f52aeb1 Code cleanup in log and format adjustment. 2023-02-02 12:12:11 -08:00
Ejaz
334fbb8879 Fixed symbol_offset and ssb_offset in rsrp measurement method 2023-02-02 11:48:40 -08:00
Melissa Elkadi
39d54215bd Removing whitespace 2023-02-01 16:59:10 -08:00
David
bb580fae58 Adding the time option to logs and removing color
By modifying the reported logs on the rx side, we
can then use the test script to analyze these logs
and figure out the time it took to achieve sync.
2023-02-01 16:38:35 -08:00
Melissa
783e3d0da6 Merge branch 'episys/add-test-metrics' into 'episys/master-sl'
Fixing spacing for test script

See merge request aburger/openairinterface5g!177
2023-02-01 23:20:17 +00:00
Melissa Elkadi
3fc1825e44 Fixing spacing for test script 2023-02-01 15:19:29 -08:00
Ejaz
c0bf78efa0 Separated SyncRef and UE in logs 2023-02-01 14:58:26 -08:00
Ejaz
c4f4a5d793 Merge branch 'episys/master-sl' into episys/ea/sss_rsrp 2023-02-01 14:49:54 -08:00
Ejaz
b6247b075b Fixed ssb index issue 2023-02-01 14:47:30 -08:00
Melissa
cfdfe6aaa7 Merge branch 'episys/david/updating_sl_launch_script' into 'episys/master-sl'
Updated sidelink launching script.

See merge request aburger/openairinterface5g!175
2023-02-01 22:40:45 +00:00
Deokseong "David" Kim
709efd5da5 Updated sidelink launching script. 2023-02-01 22:40:45 +00:00
Ejaz
d9e487359d Merge branch 'episys/master-sl' into episys/ea/for_merging_changes_4m_sss_rsrp 2023-02-01 12:06:05 -08:00
Ejaz
500069fcf0 Added Second SSS in rsrp calculation 2023-02-01 12:05:40 -08:00
Ejaz
99fb046474 Replaced ue->is_synchronized with ue->is_synchronized_sl 2023-02-01 12:05:10 -08:00
Ejaz
c8ace3b540 Added nr_ue_sl_ssb_rsrp_measurements function 2023-02-01 12:04:32 -08:00
Melissa
6fc62b0184 Merge branch 'episys/david/adding_sl_launch_scripts' into 'episys/master-sl'
Added sidelink launch scripts for both SyncRef UE and Nearby UE.

See merge request aburger/openairinterface5g!174
2023-02-01 14:54:29 +00:00
Melissa
085e84dc38 Merge branch 'episys/ea/fixed_nid_sl_calculation' into 'episys/master-sl'
Fixed nid_sl calculation formula

See merge request aburger/openairinterface5g!173
2023-02-01 14:29:49 +00:00
Ejaz Ahmed
b1407040b6 Fixed nid_sl calculation formula 2023-02-01 14:29:49 +00:00
David
88accf144e Fixed typo error in the log. 2023-01-31 18:48:12 -08:00
David
a7c5a0bb29 Indentation was changed to spaces. 2023-01-31 18:20:18 -08:00
David
2949d00083 Added sidelink launch scripts for both SyncRef UE and Nearby UE.
1. run_sl_usrp.py for launching both SyncRef UE and Nearby UE.
2. sl_rx_agent.py will be trigged by run_sl_usrp.py for Nearby UE
3. sl_usrp_cmds.txt for sidelink usrp commands.
2023-01-31 17:58:49 -08:00
Melissa
8378127c2c Merge branch 'episys/fixed_sync_ref_inconsistentency_issue' into 'episys/master-sl'
Replaced synch with sync

See merge request aburger/openairinterface5g!172
2023-01-31 23:51:23 +00:00
Ejaz Ahmed
e1d9d15b2c Replaced synch with sync 2023-01-31 23:51:23 +00:00
Melissa
53eb37e674 Merge branch 'episys/ssb_time_slot' into 'episys/master-sl'
ssb time slot allocation

See merge request aburger/openairinterface5g!171
2023-01-31 23:14:09 +00:00
Melissa Elkadi
682b1be022 Merge branch 'episys/master-sl' into episys/ssb_time_slot 2023-01-31 15:12:56 -08:00
Melissa Elkadi
f4047b7aa4 Removing commented code 2023-01-31 15:11:48 -08:00
Melissa
34d80d4754 Merge branch 'episys/ea/nid_1_nid_2_flags' into 'episys/master-sl'
Added nid1 and nid2 flags

See merge request aburger/openairinterface5g!170
2023-01-31 19:38:20 +00:00
Ejaz Ahmed
5dc3663f16 Added nid1 and nid2 flags 2023-01-31 19:38:20 +00:00
Melissa
de54ec5b8b Merge branch 'episys/fixing-cl-dl-freq' into 'episys/master-sl'
Calling nr_init_frame_parms_ue_sa we can dynamically set the tx/rx freq

See merge request aburger/openairinterface5g!169
2023-01-31 19:34:05 +00:00
Melissa
ce07b567d0 Calling nr_init_frame_parms_ue_sa we can dynamically set the tx/rx freq 2023-01-31 19:34:05 +00:00
Moein Sadeghi
4ee9a6d8c6 last commit was not correct commit. this time it is resolved ! 2023-01-31 10:36:15 -08:00
Moein Sadeghi
39726e3274 resolved merge conflict 2023-01-31 10:30:03 -08:00
Ejaz
0d5dcbbccb Merge branch 'episys-merge-develop-sl' of gitlab.int-episci.com:aburger/openairinterface5g into episys-merge-develop-sl 2023-01-31 07:38:48 -08:00
Ejaz
684f762fd9 Merge branch 'episys/fixing-cl-dl-freq' into episys-merge-develop-sl 2023-01-31 07:35:47 -08:00
David
b95722b670 Merge branch 'episys/fixing-cl-dl-freq' into episys-merge-develop-sl 2023-01-31 07:35:39 -08:00
David
b431e042fc Calling nr_init_frame_parms_ue_sa we can dynamically set the tx/rx freq
Additionally, there were a few variables defined as PARAMBOOLs
rather than ints in the softmodem-common.h so they were not properly
updated from the CL. Lastly, setting a default value for dl_freq.
2023-01-31 06:51:34 -08:00
Moein Sadeghi
43e8dcd7b6 appropriate formatting 2023-01-30 15:46:34 -08:00
Moein Sadeghi
5ea2e6d029 feature is working in rfsim 2023-01-30 15:01:21 -08:00
Moein Sadeghi
7cdf6847f1 modification regardgin SSB slot allocation 2023-01-27 12:00:22 -08:00
Melissa Elkadi
1483d53e28 Using rxdataF instead of local passed around 2023-01-23 14:44:13 -08:00
Melissa Elkadi
8727d12d18 Properly allocating common_vars->rxdataF 2023-01-23 09:12:03 -08:00
Melissa Elkadi
6f6a314ab6 Merge branch 'eurecom-develop' into episys-merge-develop-sl 2023-01-23 08:39:32 -08:00
Melissa
77f069c1af Merge branch 'episys/timestamp_sl_debug' into 'episys/master-sl'
Synchronization is working on USRPs OTA!

See merge request aburger/openairinterface5g!168
2023-01-20 22:39:13 +00:00
Melissa Elkadi
6a2f5664b8 Fixing whitespace 2023-01-20 14:38:42 -08:00
Ejaz
6d51179357 Adding/fixing whitespace 2023-01-16 13:03:32 -08:00
Ejaz
720b2669fd Properly updating the SSB start location 2023-01-16 12:55:26 -08:00
Ejaz
9ffe2b7851 Reverting write timestamps since these changes did not effect sync 2023-01-16 11:46:20 -08:00
Ejaz
6befa6b3b0 Reverting check for nr_slot_tx == 20 becasue not possible 2023-01-16 11:28:57 -08:00
Ejaz
d497806c6c Properly setting SSB offset.
Previously, we hackily changed the rx_offset right before
taking the DFT. It is better for us to properly calculate
the SSB offset. This is done by subtracting off the prefix
symbols of every symbol that exists before the correalted
PSS.
2023-01-16 11:14:29 -08:00
Ejaz
475f99195e Reverting hack 2023-01-16 10:25:37 -08:00
Ejaz
e1c152fbcf This rx_offset change is how we are able to get sync 2023-01-16 10:12:24 -08:00
Ejaz
0db28d4f5a Removing unnecessary changes 2023-01-16 09:55:50 -08:00
Ejaz
e344d531f9 Fixing merge conflicts. 2023-01-16 09:53:10 -08:00
Ejaz
433f3d1507 Reverting white space changes and unnecessary check for overflow 2023-01-16 09:50:20 -08:00
Ejaz
7e7b00e58b Merge branch 'episys/timestamp_sl' into episys/timestamp_sl_debug 2023-01-16 09:44:46 -08:00
David
9b03282972 Reverting whitespace change 2023-01-16 09:38:58 -08:00
David
b5a2dab4e9 Reverting more unnecessary changes 2023-01-16 09:38:09 -08:00
David
0f22e2a2d8 Fixing more white space 2023-01-16 09:34:16 -08:00
David
9fe8a273f2 Reverting whitespace change 2023-01-16 09:32:12 -08:00
David
e95d6e28fc Reverting init changes that have no effect on sync 2023-01-16 09:31:40 -08:00
David
71f52d180f Reverting whitespace changes 2023-01-16 09:27:24 -08:00
David
0c048b28bd Merge branch 'episys/master-sl' into episys/timestamp_sl 2023-01-16 09:24:21 -08:00
David
0a38dbb7be Clean up for MR 2023-01-16 09:15:16 -08:00
Ejaz
40a2ee85aa Sync is workinggit add -u! 2023-01-16 08:47:42 -08:00
David
c61ab7fb7e Sync is workinggit add -u! 2023-01-16 08:47:28 -08:00
Melissa Elkadi
9591a5bef5 Adding hex dumps 2023-01-13 13:58:46 -08:00
Melissa
f95c3f92ed Merge branch 'episys/cleanup-ue-thread-sl' into 'episys/master-sl'
UE_thread_sl() clean-up, code simplification, and small bug fix

See merge request aburger/openairinterface5g!166
2023-01-13 18:18:36 +00:00
Melissa
0a6e7eb898 UE_thread_sl() clean-up, code simplification, and small bug fix 2023-01-13 18:18:36 +00:00
Melissa Elkadi
26a52906df Removing 5G code that was incorrectly added, it still exists in nr_initial_sync 2023-01-13 10:15:57 -08:00
Melissa Elkadi
0f8bb964a4 White space clean up 2023-01-13 10:11:35 -08:00
Melissa Elkadi
937c7119ae The nb_prefix_samples0 is dependent on sync status.
By changing the global value of the nb_prefix_samples0
at the top of the thread, we are never able to properly
set the value after sync. To fix this, a local variable
was added in every place we use nb_prefix_samples0 in
the UE_thread_SL. However this commit has quite a few
changes becasue some places where the nb_prefix_samples0
global was used did not have the UE global available, so
we had to update the function footprint to pass in a
sync bool for proeprly setting the local nb_prefix_samples0
variable.
2023-01-13 06:48:07 -08:00
Melissa Elkadi
3e028a43b5 Not writing in the future if this data is not ready yet. 2023-01-12 15:51:11 -08:00
Ejaz
c501e448ca Updated the write_time_stamp value.
Previously this value was based on the slot_tx,
however the slot_tx is in the future and has not
be fully populated at this time (execution of writing
to USRP). So, we should write to USRP in current
slot, but we will fill the buffer in the generation
code in the future.
2023-01-11 14:57:10 -08:00
David
8313896093 Lowering init size of txdata and txdataF to not be ridiculous 2023-01-11 14:39:38 -08:00
Ejaz
87436a1884 Lowering init size of txdata and txdataF buffers to not be ridiculous 2023-01-11 14:38:46 -08:00
David
34d508ae23 Updating write timestamp
The generated SSB frame is in the future,
but what we are transmitting should be the current spot not the future
one.
2023-01-11 13:17:39 -08:00
Melissa Elkadi
ffb6ca5934 Merge branch 'episys/master-sl' into episys/cleanup-ue-thread-sl 2023-01-11 11:57:47 -08:00
Melissa Elkadi
682721cf57 Disabling MAC layer code after sync is achieved. 2023-01-11 11:05:50 -08:00
David
1a627782dd Reverting back to old SL configuration 2023-01-11 07:44:30 -08:00
Ejaz
28688065e2 Reverting back to old SL configuration 2023-01-11 07:43:56 -08:00
Ejaz
21b766912b Updating log messages for sync and adding an exit 2023-01-11 06:06:35 -08:00
Ejaz
774b8ef6e9 Merge remote-tracking branch 'episci/episys/timestamp_sl' into episys/timestamp_sl_debug 2023-01-10 09:56:10 -08:00
David
aefe918f9f Adding logs to show PSS location on TX side 2023-01-09 16:16:03 -08:00
Ejaz
1dbe99316a Changed IP address in conf and Added log in usrp_lib.cpp 2023-01-09 13:46:51 -08:00
David
b0ca489e60 Currently gets rid of LLLLs somewhat thorugh process 2023-01-09 12:07:37 -08:00
David
5d270d63ac Only seeing LLLLs on a few items! 2023-01-09 11:10:32 -08:00
David
22063a35ec Trying to get sync_ref to match gNB 2023-01-09 10:54:54 -08:00
David
d39997d8b0 Added logs to check tx sl timestamp using USRP 2023-01-06 17:19:00 -08:00
Melissa Elkadi
74998221e8 This commit does a lot of clean up.
It includes clean up of the entire UE_thread_sl().
It should also be simplifying a lot of the code and
it now uses UE->rx_offset_sl properly instead of
UE->rx_offset.
2023-01-05 13:18:27 -08:00
Melissa Elkadi
c468bd519b This commit does three things:
1. The dummyWrite is only necessary for the client (!sync_ref)
   UE, since it should write dummy data for timing to the server.
2. There is a typo in one of the logs (pbch -> psbch)
3. The MAC layer is currently disabled. We should not fill the
   RX_IND since it is not even allocated. Later we can re-enable
   this code.
2023-01-05 11:23:22 -08:00
Melissa
385243f521 Merge branch 'episys/validated-tx-on-rfsim' into 'episys/master-sl'
Updating hexdumps for debugging

See merge request aburger/openairinterface5g!165
2023-01-03 19:54:32 +00:00
Melissa
0453ef25dd Updating hexdumps for debugging 2023-01-03 19:54:32 +00:00
Melissa
a909589185 Merge branch 'episys/validated-tx-on-rfsim' into 'episys/master-sl'
TX Data Validation for RFSIM

See merge request aburger/openairinterface5g!164
2023-01-03 19:27:16 +00:00
Melissa
064b05aee8 TX Data Validation for RFSIM 2023-01-03 19:27:16 +00:00
Melissa
4f34b5f97a Merge branch 'episys/mel/preventing-overflow-during-decode' into 'episys/master-sl'
The calculation of -1/1 in decoding was buggy.

See merge request aburger/openairinterface5g!162
2022-12-20 23:58:56 +00:00
Melissa
9c2c8067ef The calculation of -1/1 in decoding was buggy. 2022-12-20 23:58:56 +00:00
Melissa
ca86a8a5ac Merge branch 'episys/mel-modifying-idft-input-output-pointer-locations' into 'episys/master-sl'
Changing the address in which the output of the IDFT starts

See merge request aburger/openairinterface5g!160
2022-12-19 19:27:59 +00:00
Melissa
4708a7d81c Changing the address in which the output of the IDFT starts 2022-12-19 19:27:59 +00:00
Melissa
1d730cd8e2 Merge branch 'episys/rotate-in-freq-domain' into 'episys/master-sl'
Rotating the txdata buffer in the freq domain

See merge request aburger/openairinterface5g!158
2022-12-14 23:33:06 +00:00
Melissa Elkadi
e20bd2edaa Rotating the txdata buffer in the freq domain 2022-12-14 15:22:08 -08:00
Melissa
fc236e4bd3 Merge branch 'episys/mel-debugging-dmrs-correl' into 'episys/master-sl'
Validate the pilot bits and suspect PSBCH channel estimation is problematic.

See merge request aburger/openairinterface5g!155
2022-12-13 23:56:03 +00:00
Melissa Elkadi
2ebef66785 Removing unnecessary change 2022-12-13 15:53:18 -08:00
Melissa Elkadi
4cd71874c0 Adding gold psbch back in to RX side 2022-12-13 15:50:27 -08:00
Melissa Elkadi
c19ffff075 Removing redundant return 2022-12-13 15:44:49 -08:00
Melissa Elkadi
1c50671296 Improved performance by resetting k every symbol 2022-12-13 15:00:41 -08:00
Melissa Elkadi
611c98f6f1 Resetting the k value seems to help channel estimation on DMRS 2022-12-13 13:46:25 -08:00
Melissa Elkadi
a66d7fcafc More whitespcae clean up 2022-12-13 13:23:27 -08:00
Melissa Elkadi
c6a972f65e More code clean up 2022-12-13 13:19:55 -08:00
Melissa Elkadi
28290c792d Clean up for MR 2022-12-13 13:13:20 -08:00
Melissa Elkadi
aa2e0319d0 Adding uncommented code and update to match Ejaz 2022-12-13 11:32:11 -08:00
Melissa Elkadi
0cce63fae9 Code clean up and running DMRS correlation on all PSBCH symbols 2022-12-13 11:21:44 -08:00
Melissa Elkadi
f4bd344b9b This commit has several changes (some hacks) that result in correct first 3 PSBCH decoding
The changes include:
1. The last argument in nr_slot_fep_init_sync() is the
   ssb_offset. This offset was shifting the rxdata buffer
   by PSS location (2368) - # prefix samples (144) = 2224.
   This offset was causing the first PSBCH to be missed and
   the other symbols to be shifted. Now, by setting this
   offset argument to 0, the shift is 144, 144+2048, 144+2048*2, etc.

2. The estimateSz fed to the nr_psbch_channel_estimation should
   be the number of symbols per slot * ofdm sym size * sizeof(int).

3. The nb_prefix_samples was not matching between the TX and RX side.
   The first cp_size is nb_prefix_samples if sync is 0.

Lastly, we can only correlate with the first 3 PSBCH symbols.
Meaning, the 0th, 5th, and 6th symbol index in the SSB.. Not sure why.
2022-12-09 13:45:31 -08:00
Melissa Elkadi
565f6e13b0 Merge branch 'episys/nr_initial_sync_ota_test' into episys/mel-debugging-dmrs-correl 2022-12-09 11:33:05 -08:00
Melissa Elkadi
30e6cc01c6 Hacked the psbch reception in nr_sl_initial_sync without DMRS correlation... and it works! 2022-12-09 11:27:44 -08:00
Melissa Elkadi
f9f8e21b55 Applying rotation to time domain of txdata instead of freq domain 2022-12-09 11:20:55 -08:00
Melissa Elkadi
bb1699e4d6 In this commit, we validated the first set of pilot bits.
The nr_psbch_dmrs_rx() is able to properly generate the
pilot bits used in the PSBCH correaltion. It seems that the
RXdataF is not properly aligned and we cannot correlate
with the pilot bits
2022-12-09 10:29:35 -08:00
Melissa Elkadi
853f2737a4 Reverting incorrect change 2022-12-09 08:24:57 -08:00
Melissa Elkadi
7f3242a2b4 Merge branch 'episys/nr_initial_sync_ota_test' into episys/mel-debugging-dmrs-correl 2022-12-09 08:08:38 -08:00
Melissa Elkadi
f2e678375b Clean up of nr_psbch_detection 2022-12-09 08:03:34 -08:00
David Kim
6444ee9aee Changed dmrs signal index in psbch. 2022-12-08 20:07:43 -08:00
Melissa
5fc0e53cc8 Merge branch 'nr_sl_phy_2' into 'episys/master-sl'
SSS synch working

See merge request aburger/openairinterface5g!154
2022-12-09 00:35:30 +00:00
Melissa Elkadi
147b5af7fe Fixing small whitespace changes and re-assignment of rxdataF 2022-12-08 16:33:43 -08:00
Melissa Elkadi
fa5fb4e49b Cleaning up rx_sss_sl_nr() 2022-12-08 16:29:22 -08:00
Melissa Elkadi
d98f09825f Cleaning up pss_sl_ch_est_nr() 2022-12-08 16:14:15 -08:00
Melissa Elkadi
74c075a751 Cleaning up pss_sss_sl_extract_nr() 2022-12-08 16:07:21 -08:00
Melissa Elkadi
f6815c381a Cleaning up nr_sl_initial_sync() 2022-12-08 15:56:43 -08:00
Prashanth Saidu
7268877512 formatting nr_sl_initial_sync 2022-12-08 15:35:23 -08:00
Prashanth Saidu
9114cd36cd Reverting Correlation threshold to 30K from 60K as results are better at 30K 2022-12-08 14:02:21 -08:00
Prashanth Saidu
530a5a3f01 Cleanup pss_sl_ch_est_nr 2022-12-08 13:46:11 -08:00
Prashanth Saidu
1a9148ae2f Cleaning upnr_sl_initial_sync 2022-12-08 13:23:25 -08:00
Prashanth Saidu
e74d9c8aea Cleaning up pss_sss_sl_extract_nr 1 2022-12-08 11:15:21 -08:00
Prashanth Saidu
662d453bf5 Cleaning up pss_sss_sl_extract_nr 2022-12-08 11:12:49 -08:00
Prashanth Saidu
00885ccfd6 Calling nr_psbch_detection() instead of nr_pbch_detection 2022-12-08 10:55:41 -08:00
Prashanth Saidu
2e17b65004 Removing ref to Nid_cell and adjusting correlation threshold for SL 2022-12-08 08:56:15 -08:00
Prashanth Saidu
df3a7bab95 Fixing spaces in pbchsim.c 2022-12-07 15:06:02 -08:00
Ejaz AHmed
c96851dc0d Updated rx_sync in the psbchsim to handle all psbch symbols 2022-12-07 13:27:04 -08:00
Prashanth Saidu
8c528798ad Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-12-07 12:49:22 -08:00
Ejaz AHmed
c065dc89bb Merge branch 'episys/master-sl' into episys/nr_initial_sync_wplan 2022-12-07 10:45:51 -08:00
Prashanth Saidu
f339b8b1e7 Fixed SSS correlation 2022-12-07 10:16:18 -08:00
Melissa
24cec4d5ba Merge branch 'episys/changed_phy_parameters' into 'episys/master-sl'
Changed PHY parameters in psbchsim

See merge request aburger/openairinterface5g!153
2022-12-06 23:32:19 +00:00
Ejaz AHmed
0d769760fd Changed PHY parameters in psbchsim 2022-12-06 12:18:50 -08:00
Prashanth Saidu
8fb5f5a350 Updated SSS unit test 2022-11-18 11:40:10 -08:00
Ejaz Ahmed
9ffc7359b4 Merge branch 'episys/pss_sync' into 'episys/master-sl'
Some of the rx side functions updated to enable pss initial synchronization

See merge request aburger/openairinterface5g!151
2022-11-18 17:45:40 +00:00
Ejaz Ahmed
e6d200befe Some of the rx side functions updated to enable pss initial synchronization 2022-11-18 17:45:39 +00:00
Prashanth Saidu
e079c43485 Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-18 08:49:36 -08:00
Prashanth Saidu
5f200844a4 updated log vectors for SSS and PSS 2022-11-18 08:48:26 -08:00
Melissa
6a4aa58c2e Merge branch 'episys/mel-new-pss-tests' into 'episys/master-sl'
Adding Sidelink PSS and SSS Tests into the PSBCH Simulator.

See merge request aburger/openairinterface5g!150
2022-11-18 16:46:12 +00:00
Melissa Elkadi
679bcc4365 Updating white space 2022-11-18 08:45:45 -08:00
Melissa Elkadi
9f056450d6 Freeing allocated memory regardless of PSS/SSS mode or PSBCH sim mode.
Also, reverting UE->common_vars.eNb_id == pss_sequence_number
comparison for *now* until we merge in updated PSS and SSS
code. In which case, it will be:
UE->common_vars.N2_id == pss_sequence_number
2022-11-18 05:58:22 -08:00
Prashanth Saidu
27994e444d Removing a debug while(1) 2022-11-17 16:10:19 -08:00
Melissa Elkadi
9d11486431 Updating the code to support PSS SL changes 2022-11-17 14:06:32 -08:00
Prashanth Saidu
e6ed641079 SSS metric is lower than floor, needs to be fixed 2022-11-17 13:00:51 -08:00
Melissa Elkadi
99bdc94279 Updating pss_test boolean to be named properly 2022-11-17 09:59:02 -08:00
Melissa Elkadi
a86559bdce Adding sss sl test into the simulator.
The new nr_sss_sl_test.c/h files are used
for the SSS test. These files are simplified
versions of the pss_tests that already exist.

Now that these tests are able to be compiled
and ran, they should explicitly call the SL
specific SSS functions
2022-11-17 09:54:05 -08:00
Melissa Elkadi
971bb3bfc0 Code clean up 2022-11-16 13:56:45 -08:00
Melissa Elkadi
c387aa0f0d Adding pss sl test into the simulator.
The new nr_pss_sl_test.c/h files are used
for the PSS test. These files are simplified
versions of the pss_tests that already exist.

Now that these tests are able to be compiled
and ran, they should explicitly call the SL
specific PSS functions.
2022-11-16 13:44:19 -08:00
Prashanth Saidu
10ec942d67 Enabing nr_sl_initial_sync 2022-11-16 11:31:42 -08:00
Prashanth Saidu
91338a7439 Updated NID SL macro to use Nid_SL 2022-11-16 10:50:49 -08:00
Prashanth Saidu
a5ff057b69 Updated GET_NID macros 2022-11-16 10:38:50 -08:00
Melissa Elkadi
d04291d66d Revert "Merge branch 'episys/master-sl' of gitlab.int-episci.com:aburger/openairinterface5g into episys/master-sl"
This reverts commit 4b9bc61748, reversing
changes made to 12f240c7e5.
2022-11-16 09:49:23 -08:00
Melissa Elkadi
4b9bc61748 Merge branch 'episys/master-sl' of gitlab.int-episci.com:aburger/openairinterface5g into episys/master-sl 2022-11-16 09:30:33 -08:00
Prashanth Saidu
a0a0e32f68 Fixed GET_NID1_SL computation 2022-11-16 08:47:31 -08:00
Prashanth Saidu
8167d64bcb Updated computation of Nid1, Nid2 2022-11-15 12:24:18 -08:00
Prashanth Saidu
e6b101d7da Update SSS with 2nd SSS symnbol computations 2022-11-14 20:02:28 -08:00
Prashanth Saidu
3689def55f Added PSS and SSS sync for Side Link 2022-11-14 09:55:31 -08:00
Prashanth Saidu
a8c79ebf3b Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-11 12:31:13 -08:00
Melissa
12f240c7e5 Merge branch 'episys/david/sl_param_and_channel_update' into 'episys/master-sl'
Sidelink Parameter and Channel index update.

See merge request aburger/openairinterface5g!149
2022-11-11 18:19:52 +00:00
Deokseong "David" Kim
e1fc0a4d6b Sidelink Parameter and Channel index update. 2022-11-11 18:19:52 +00:00
Prashanth Saidu
1c602f0e92 Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-07 05:46:16 -08:00
Melissa Elkadi
f5ad65cd2e Using the working polar_decoder instead of polar_decode_int16 2022-11-04 17:46:50 -07:00
Deokseong "David" Kim
4fe865a30f Merge branch 'episys/debug_psbchsim' into 'episys/master-sl'
Changed the number of dmrs RE per symbol in psbch.

See merge request aburger/openairinterface5g!147
2022-11-04 23:40:15 +00:00
Ejaz AHmed
4ba390adfc Changed the number of dmrs RE per symbol in psbch. 2022-11-04 16:20:50 -07:00
Prashanth Saidu
ebfa50dce4 Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-04 11:20:05 -07:00
Deokseong "David" Kim
3d1631a673 Merge branch 'episys/develop-sl' into 'episys/master-sl'
PSBCH simulator parameter update.

See merge request aburger/openairinterface5g!146
2022-11-04 18:13:24 +00:00
David Kim
7ea1501058 PSBCH simulator parameter update. 2022-11-04 11:02:47 -07:00
Deokseong "David" Kim
6fe163f4c4 Merge branch 'nr_sl_phy_2' into 'episys/master-sl'
Updates to PSBCH DMRS Tx

See merge request aburger/openairinterface5g!145
2022-11-04 16:40:33 +00:00
Prashanth
38cccc73f0 Updates to PSBCH DMRS Tx 2022-11-04 16:40:32 +00:00
Prashanth Saidu
75d0b6116e Removing DMRS mod_count check to let complete DMRS generation 2022-11-03 21:31:56 -07:00
Melissa
acb3a50768 Merge branch 'mel-debugging-psbchsim' into 'episys/master-sl'
Fixing for loop indices for PSBCH

See merge request aburger/openairinterface5g!144
2022-11-04 00:02:40 +00:00
Melissa Elkadi
e51ce1d232 Removing DEBUG_PSBCH definition 2022-11-03 17:02:26 -07:00
Melissa Elkadi
e23e81425c Fixing for loop indices for PSBCH 2022-11-03 17:00:01 -07:00
Melissa
14234e9eca Merge branch 'episys/david/updating_psbch_rx_side' into 'episys/master-sl'
Updating psbch rx side

See merge request aburger/openairinterface5g!143
2022-11-03 23:20:33 +00:00
Deokseong "David" Kim
5dd561743e Updating psbch rx side 2022-11-03 23:20:33 +00:00
Prashanth Saidu
264ab2ddd2 Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-03 16:18:58 -07:00
Melissa
1e3932fbe1 Merge branch 'debugging-polar-encoding' into 'episys/master-sl'
HACKY change for NR_POLAR_PSBCH_E.

See merge request aburger/openairinterface5g!142
2022-11-03 22:43:41 +00:00
Melissa Elkadi
51b8271ee9 HACKY change for NR_POLAR_PSBCH_E.
This is going to be a long explaination. The spec says
for polar encoding that N = 512 (input size) - 2^9,
K = 56, and E (encoded size) = 1782. However, the interleaver
will break 512 into 16, 32 bit sections. These 16 sections
are moved around to form the interleaved input. Then
the code does something else and basically, every 16th
bit is modified (or important) and triggers the mingroupsize
to be 16. The mingroupsize is calculated in a for loop and
starts from 0->16 and then resets again at 0. However, the
E size if 1782, which is not divisible by 16, will make
minigroupsize end at 6 (it is incremented until the special
character is found at index 16). The hack is to just
make 1782 large enough so the last bit is found, so we change
it to size 1792.
2022-11-03 15:36:03 -07:00
Prashanth Saidu
c6d13e8d73 Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-03 14:35:52 -07:00
Melissa
8a8c5275b0 Merge branch 'episys/convert_payload_to_nrue' into 'episys/master-sl'
Created psbch_nr_sl; Added nr_generated_sl_psbch() function

See merge request aburger/openairinterface5g!141
2022-11-03 20:11:24 +00:00
Ejaz Ahmed
a884e37625 Created psbch_nr_sl; Added nr_generated_sl_psbch() function 2022-11-03 20:11:23 +00:00
Prashanth Saidu
dc84deafea merge to master-sl 2022-11-03 11:38:36 -07:00
Melissa
23adfc132a Merge branch 'update-psbchsim-mode2' into 'episys/master-sl'
Moving nr_sl_common_signal_procedures to nr_psbch.c temporarily

See merge request aburger/openairinterface5g!140
2022-11-03 17:47:15 +00:00
Melissa Elkadi
be8bed3602 Fixing white space and adding new dmrs gen file to UE 2022-11-03 10:45:47 -07:00
Melissa Elkadi
a8cb993e56 This commit moves the DMRS symbol generation to the UE side
In this commit, the code properly builds and is able to
(somehow) generate non-zero values into the txdata buffer.
2022-11-03 10:40:51 -07:00
Melissa Elkadi
43da8296cf Moving nr_sl_common_signal_procedures to nr_psbch.c temporarily
Currently, the psbchsim will build and run correctly without
linking errors. Several solutions have been tried unsuccessfully.
Now that we have a working version, we will save these changes
and try a few more logical places to put this
2022-11-03 10:17:48 -07:00
Melissa
3462053a08 Merge branch 'update-psbchsim-mode2' into 'episys/master-sl'
Moving psbchsim to be only UE dependent

See merge request aburger/openairinterface5g!139
2022-11-03 01:07:53 +00:00
Melissa Elkadi
5e21c904ae This commit adds assert fatals and code clean up 2022-11-02 18:01:50 -07:00
Melissa Elkadi
26395fa2c2 Merge branch 'episys/master-sl' into update-psbchsim-mode2 2022-11-02 16:52:59 -07:00
Melissa
f62ea2b3e0 Merge branch 'adding_sl_common_signal_procedures' into 'episys/master-sl'
Adding sl common signal procedures

See merge request aburger/openairinterface5g!138
2022-11-02 23:52:13 +00:00
Deokseong "David" Kim
f70097d9c9 Adding sl common signal procedures 2022-11-02 23:52:13 +00:00
Melissa Elkadi
47c400da03 Adding hex dumps for debugging tx payloads 2022-11-02 15:59:24 -07:00
Melissa Elkadi
a01a5f06ed Moving psbchsim to be only UE dependent
Also, this commit includes removing the NR_txUE_PSBCH
struct members into the NR_UE_PSBCH struct. At this point,
I cannot see a reason for a seprate struct. Especially
since the NR_txUE_PSBCH is not declared within the PHY_VARS_UE
scope so it is not accessible by the UE PHY layer global
anyways.

Additionally, the changes in psbchsim will allow the
UE to be used instead of the gNB. It configures the
frame parameters and should allocate memory for the
tx and rx buffers used in SL.
2022-11-02 15:50:43 -07:00
Melissa
d8a53795fe Merge branch 'nr_sl_phy_2' into 'episys/master-sl'
NR SL PHY updates 1

See merge request aburger/openairinterface5g!137
2022-11-02 21:08:41 +00:00
Prashanth
42991ff0ca NR SL PHY updates 1 2022-11-02 21:08:40 +00:00
Melissa
087318f333 Merge branch 'new-sl-file-creation' into 'episys/master-sl'
UE frame parameter configuration

See merge request aburger/openairinterface5g!136
2022-11-02 21:06:59 +00:00
Ejaz Ahmed
c2c574f153 UE frame parameter configuration 2022-11-02 21:06:59 +00:00
Prashanth Saidu
96b7930292 Update log for ssb_start_symbol 2022-11-02 13:55:46 -07:00
Prashanth Saidu
789b639bbe removing gNB arguments in SL PSBCH DMRS 2022-11-02 13:49:00 -07:00
Prashanth Saidu
7b5eb7e1b7 SSS PSS deleting gNB arguments 2022-11-02 13:39:45 -07:00
Prashanth Saidu
04d35e8d7e Updating Nid ops from 335 to 336 2022-11-02 13:26:03 -07:00
Prashanth Saidu
bef8362087 Updated Nid for LS SSS 2022-11-02 13:12:27 -07:00
Prashanth Saidu
d80ba9b649 increasing pilot size to accommodate for new size 2022-11-02 12:59:15 -07:00
Prashanth Saidu
fdd75c4a36 moved sl sss generation to separate file 2022-11-02 10:30:52 -07:00
Prashanth Saidu
31beafbd04 Merge branch 'episys/master-sl' into nr_sl_phy_2 2022-11-02 09:56:59 -07:00
Melissa
b203c79d87 Merge branch 'new-sl-file-creation' into 'episys/master-sl'
Adding sidelink functions and files

See merge request aburger/openairinterface5g!135
2022-11-02 01:26:02 +00:00
Melissa Elkadi
18188b6f39 Updating white space 2022-11-01 18:25:08 -07:00
Melissa Elkadi
3e8ad6e26c Updating white space 2022-11-01 18:23:12 -07:00
Melissa Elkadi
6ef808cae1 Updating cmake cache to be correct 2022-11-01 18:20:13 -07:00
Melissa Elkadi
bc2fe3db05 Fixing build and white space errors
A few gNB items were added back into psbchsim to ensure it successfully builds
2022-11-01 18:17:43 -07:00
Prashanth Saidu
400447825a Using psbch sources 2022-11-01 17:59:17 -07:00
Prashanth Saidu
75f52cef4a Added SL_PSBCH to use UE instead of gNb 2022-11-01 17:38:39 -07:00
Melissa Elkadi
4bec2f496d Merge branch 'episys/master-sl' into new-sl-file-creation 2022-11-01 17:27:22 -07:00
Melissa Elkadi
39c6b07820 Defined nr_sl_generate_pss in UE PHY procedures 2022-11-01 17:22:01 -07:00
Melissa
f2cf9f0bd1 Merge branch 'episys/david/porting_nr_sl_generate_pss' into 'episys/master-sl'
Porting nr sl generate pss

See merge request aburger/openairinterface5g!134
2022-11-02 00:17:52 +00:00
Deokseong "David" Kim
38b1b41682 Porting nr sl generate pss 2022-11-02 00:17:51 +00:00
Melissa
68638ae67c Merge branch 'episys/david/adding_phy_procedures_nrUE_SL_TX' into 'episys/master-sl'
Adding phy procedures nr ue sl tx

See merge request aburger/openairinterface5g!133
2022-11-01 23:54:18 +00:00
Deokseong "David" Kim
9000f91f7e Adding phy procedures nr ue sl tx 2022-11-01 23:54:17 +00:00
Prashanth Saidu
46b1cf6dc9 Updated SL functions for Rx 2022-11-01 16:01:11 -07:00
Prashanth Saidu
a74d7fa54f Changed to support PSS for Side Link. 2022-11-01 12:03:02 -07:00
Melissa Elkadi
cdec2dd204 Temporarily using Lmax == 4 for SL 2022-11-01 10:51:59 -07:00
Melissa Elkadi
f98be66eda Updating generat dmrs for psbch 2022-11-01 10:31:27 -07:00
Melissa Elkadi
af5c062638 Updating assert fatals 2022-11-01 10:08:19 -07:00
Melissa Elkadi
6ca28a9931 Removing warnings and calling nr_sl_initial_sync in nr_psbchsim 2022-11-01 08:32:10 -07:00
Melissa Elkadi
ce10596a13 Merge branch 'episys/master-sl' into new-sl-file-creation 2022-11-01 08:19:59 -07:00
Melissa Elkadi
d9a8108a15 Adding sidelink files and structs.
The purpose of this commit is to:
1. Stop using NR functions for SL functions
2. Removing SL functions from NR functions
3. Creating new #define SL values rather than just changing NR #defines
4. Creating new psbchsim.c (which fails)
5. Adding AssertFatals and code clean up

The next steps include:
- Implementing initial_sync for SL
- Validating that the SL values are correct
- Getting psbchsim.c to pass
2022-11-01 08:18:55 -07:00
Melissa Elkadi
1b5005277c Conducting more code clean up and fixing warnings
Also, I have started to add the psbchsim.c.
The next fix should be to update all pbch members
to be psbch.
2022-11-01 06:47:02 -07:00
Melissa Elkadi
ee9b35bec7 Fixing white space 2022-10-31 18:31:25 -07:00
Prashanth Saidu
d82ab58c24 Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-31 18:29:57 -07:00
Prashanth Saidu
dbcc558f04 Support for SL id on SSS 2022-10-31 18:26:52 -07:00
Prashanth Saidu
54f8add2de Support for SL PSS, SSS on Rx 2022-10-31 18:04:37 -07:00
Melissa Elkadi
6e11362b75 Code clean up and adding more assertions 2022-10-31 17:02:13 -07:00
Prashanth Saidu
59310feb4b updated psbch_e size for scrambling 2022-10-31 13:41:05 -07:00
Melissa Elkadi
8017cb16f3 More code clean up and error checking 2022-10-29 13:35:59 -07:00
Melissa Elkadi
be32f71b1a Updating AssertFatal logs and adding a few more 2022-10-29 13:24:09 -07:00
Melissa Elkadi
193720a376 Adding assert fatals and more code clean up 2022-10-29 13:19:24 -07:00
Melissa Elkadi
865dd7984d Code clean up
This commit consists of simple white space changes,
function alignment and moving local variable declarations
near the first usage.
2022-10-29 13:02:06 -07:00
Prashanth Saidu
d31d050dd5 added psbch ch estimate 2022-10-28 12:36:38 -07:00
Melissa
3ae4e95775 Merge branch 'episys/david/sidelink_thread_update' into 'episys/master-sl'
Episys/david/sidelink thread update

See merge request aburger/openairinterface5g!132
2022-10-28 18:23:20 +00:00
Deokseong "David" Kim
1450ffd015 Episys/david/sidelink thread update 2022-10-28 18:23:20 +00:00
Melissa
0ff5045410 Merge branch 'episys/sidelink_preconfig' into 'episys/master-sl'
Implemented required sidelink preconfigurations, SLSS and MIB-SL for NR

See merge request aburger/openairinterface5g!131
2022-10-28 18:13:30 +00:00
Ejaz Ahmed
e6a68d8cf2 Implemented required sidelink preconfigurations, SLSS and MIB-SL for NR 2022-10-28 18:13:29 +00:00
Prashanth Saidu
a093745aa1 updated psbch ch level and compensation 2022-10-27 15:36:00 -07:00
Prashanth Saidu
0af95f24fc updated PSBCH sizes 2022-10-27 13:39:13 -07:00
Prashanth Saidu
6d1462712c added psbch_dmrs_rx 2022-10-27 11:32:53 -07:00
Prashanth Saidu
048782bbec updated nr_psbch_extract 2022-10-27 08:47:01 -07:00
Prashanth Saidu
7397fca459 added nr_rx_psbch 2022-10-26 12:55:59 -07:00
Prashanth Saidu
3dfb02e876 added ssb frame plus rx functions 2022-10-26 12:06:37 -07:00
Melissa
7e31ec9994 Merge branch 'episys/david/adding_sync_ref_flag' into 'episys/master-sl'
Added sync_ref flag in command line argument to specify SyncRef UE.

See merge request aburger/openairinterface5g!130
2022-10-21 00:25:28 +00:00
Deokseong "David" Kim
594811b9e6 Added sync_ref flag in command line argument to specify SyncRef UE. 2022-10-21 00:25:27 +00:00
Deokseong "David" Kim
c18da15703 Merge branch 'episys/master-sl-cleanup' into 'episys/master-sl'
Fixing camel case vs. underscores to be consistent

See merge request aburger/openairinterface5g!129
2022-10-20 16:48:26 +00:00
Melissa Elkadi
c7c30d26b5 Cleaning up white space 2022-10-20 06:30:07 -07:00
Melissa Elkadi
b2cf3f5270 Fixing camel case vs. underscores to be consistent 2022-10-19 16:55:06 -07:00
Melissa
1ebc4643e9 Merge branch 'episys/david/sidelink_thread_creation' into 'episys/master-sl'
Added sidelink sync flags to check sync status.

See merge request aburger/openairinterface5g!127
2022-10-19 23:09:51 +00:00
David Kim
e77818daf8 Added sidelink sync flags to check sync status. 2022-10-19 13:50:07 -07:00
Melissa
eb6068cc1f Merge branch 'episys/david/adding_SL_thread_placeholder' into 'episys/master-sl'
Added Sidelink thread placeholder.

See merge request aburger/openairinterface5g!126
2022-10-18 19:39:34 +00:00
Deokseong "David" Kim
fbec6c1261 Added Sidelink thread placeholder. 2022-10-18 19:39:34 +00:00
Melissa
2b05e90a57 Merge branch 'nr_sl_phy' into 'episys/master-sl'
Support for Side Link PSBCH Tx and Rx.

See merge request aburger/openairinterface5g!125
2022-10-12 00:23:05 +00:00
Prashanth Saidu
028166428d Fixed MR comments 2022-10-11 17:21:48 -07:00
Prashanth Saidu
fccae8a158 Fixed MR comments 2022-10-11 17:17:29 -07:00
Prashanth Saidu
9e8f3f8c67 Fixing MR comments 2022-10-11 17:11:59 -07:00
Prashanth Saidu
5886bb2b6a Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 17:03:03 -07:00
Prashanth Saidu
a999ce41ce Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 17:02:35 -07:00
Prashanth Saidu
d911c83c56 Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 16:59:59 -07:00
Prashanth Saidu
471df37f73 Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 16:59:43 -07:00
Prashanth Saidu
fab708d74e Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 14:02:42 -07:00
Prashanth Saidu
96583ee109 Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 14:02:24 -07:00
Prashanth Saidu
d3dd8af4cc Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 13:16:25 -07:00
Prashanth Saidu
f9642228af Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 13:16:04 -07:00
Prashanth Saidu
7a30b607e5 Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 13:13:16 -07:00
Prashanth Saidu
042b9e3c85 Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 13:12:48 -07:00
Prashanth Saidu
e57d62184e Merge branch 'nr_sl_phy' of gitlab.int-episci.com:aburger/openairinterface5g into nr_sl_phy 2022-10-11 12:23:26 -07:00
Prashanth Saidu
0139c38786 Merge branch 'episys/master-sl' into nr_sl_phy 2022-10-11 12:22:22 -07:00
Prashanth Saidu
81c5c06414 Merge branch 'episys/master-sl' into nr_sl_phy 2022-10-11 11:56:54 -07:00
Prashanth Saidu
8e702ad0d0 Merge branch 'develop' into episys/master-sl 2022-10-11 11:55:06 -07:00
Prashanth Saidu
8a06717f95 Merge branch 'episys/master-sl' into nr_sl_phy 2022-10-11 11:43:34 -07:00
Prashanth Saidu
123bf7e339 PSBCH Sidelink PHY Tx and Rx working, SSSB frame creation pending 2022-10-07 14:53:58 -07:00
Melissa
0bfaeac94b Merge branch 'adding-new-sl-cl-opt' into 'episys/master-sl'
Adding two new sidelink command line options

See merge request aburger/openairinterface5g!124
2022-10-05 22:29:28 +00:00
Melissa
81a2d3854b Adding two new sidelink command line options 2022-10-05 22:29:27 +00:00
Prashanth Saidu
e6bcd4e559 Added PSBCH payload with bitwise formatting 2022-10-03 16:22:52 -07:00
Prashanth Saidu
0d78000ca3 Added PSBCH payload 2022-09-27 17:05:18 -07:00
Prashanth Saidu
175579f8e2 PBCH side link phy initial version 2022-09-19 15:34:58 -07:00
Melissa Elkadi
05d2c538ea Merge branch 'episys-lte-handover' into develop 2022-09-19 11:33:21 -07:00
David Kim
28a78f02a8 Removed duplicated flag __func__ in the logging line. 2022-09-16 18:06:21 -07:00
David Kim
9de72b2e7e Merge remote-tracking branch 'eurocom/develop' into episys-lte-handover 2022-09-16 15:01:08 -07:00
David Kim
c6a892c15d Added explanations for AWGN results files. 2022-09-16 14:51:58 -07:00
David Kim
618ea544c2 Setting pdcp security mode active in LTE handover. 2022-09-16 14:02:19 -07:00
David Kim
4ed69e515e Removed return in gtp_itf.cpp to make ping work in lte mode. 2022-09-14 13:27:16 -07:00
David Kim
124715d93e Restored entity->is_gnb flag in sdap_data_ind for NR PDCP. 2022-09-12 21:44:59 -07:00
David Kim
26553dfdad Merge remote-tracking branch 'eurocom/develop' into episys-lte-handover 2022-09-12 16:26:16 -07:00
David Kim
844d683915 Updated docker-compose file to fix node-number value. 2022-09-09 17:53:48 -07:00
David Kim
47c429e8c3 Merge branch 'episys-lte-handover' of https://gitlab.eurecom.fr/oai/openairinterface5g into episys-lte-handover 2022-09-08 16:08:12 -07:00
Melissa Elkadi
33d9f68cda Merge branch 'episys-lte-handover-debugging' of gitlab.int-episci.com:aburger/openairinterface5g into episys-lte-handover-debugging 2022-09-07 17:45:39 -07:00
Melissa Elkadi
8618b6ad60 The new changes for exiting nr-softmodem properly broke NSA mode.
In this commit we are sure not to exucute PHY parameters
in emulated mode.
2022-09-07 17:44:41 -07:00
David Kim
893ca2a4cb Removed merge lines in config file. 2022-09-07 17:00:20 -07:00
David Kim
ef09160447 Update NRUE interface config in MACRLC layer.
1. Configuration file update corresponding to NRUE.
2. Compile error fix.
3. Reverting node id to new one.
2022-09-07 14:17:09 -07:00
David Kim
1ab09a6fa8 Handling of exceptional pdu size case for ULSCH Trncated BSR. 2022-09-07 11:59:00 -07:00
Melissa Elkadi
0134d8c914 First attempt to stop using configurations from L1
We need to now configure the NR UE based on MACRLC
similar to how the gNB does. This is started but not
tested in this commit. We only need to update for the
NRUE.
2022-09-07 11:52:46 -07:00
David Kim
ac0ec7b314 Merge remote-tracking branch 'eurocom/develop' into episys-lte-handover 2022-09-07 10:22:42 -07:00
Melissa Elkadi
9350e05ad6 Reverting node_number changes to show SA mode working.
However, currently 6c31639522 and
some other related changes have broken the path for getting the
MIB in emulated SA mode. The full source of these changes has not
been established. This may or may not be a big problem. It seems
that all other connections and the RA procedure are completing
properly. Therefore, we may decide not to worry about this and
simply make the assumption that the MIB configuration information
is hard coded for emulated mode and move on.
2022-09-06 18:10:27 -07:00
Melissa Elkadi
76797a5e86 Merge branch 'eurecom-develop' into episys-lte-handover 2022-09-06 12:29:02 -07:00
Melissa Elkadi
6163143cfe Merge branch 'eurecom-develop' into episys-lte-handover 2022-09-01 16:11:47 -07:00
Melissa Elkadi
60bcbb230f Reverting these changes as MR 1573 should cover them 2022-09-01 16:10:45 -07:00
Melissa Elkadi
57824f4f02 Merge branch 'eurecom-develop' into episys-lte-handover 2022-08-25 15:26:19 -07:00
David Kim
9642337729 Code cleanup. 2022-08-17 10:44:30 -07:00
Melissa Elkadi
c265a6ec6a Removing unused variables to resolve added warnings. 2022-08-17 08:27:00 -07:00
Melissa Elkadi
0558d55259 Reverting incorrect change 2022-08-17 07:44:44 -07:00
Melissa Elkadi
c2328793a3 A few more whitespace changes 2022-08-17 07:34:26 -07:00
Melissa Elkadi
e1300914da Fixing whitespace changes for MR-1642 2022-08-17 07:20:36 -07:00
Melissa Elkadi
713f6632f9 Fixing CI/CD build errors 2022-08-15 06:43:07 -07:00
Melissa Elkadi
9e8bd87501 Merge branch 'eurecom-develop' into episys-lte-handover 2022-08-12 15:59:25 -07:00
David Kim
b508ea71f8 Removed heap-use-after-free issue. 2022-08-12 10:34:09 -07:00
David Kim
be5a93b29a Removed INHIBIT_REALTIME_SCHEDULER flag. 2022-08-12 10:00:36 -07:00
David Kim
972256cd6e Code cleanup, log level reset, code location adjustment.
1. Code cleanup and format update.
2. Log level reset
3. Channel model related codes moved into NR_Packet_Drop.c or .h file.
2022-08-12 09:57:31 -07:00
David Kim
b5c2634151 Merge branch 'eurocom/develop' into episys-lte-handover 2022-08-03 14:11:26 -07:00
David Kim
992aa392a9 Adding shift in build_oai item. 2022-07-29 17:35:39 -07:00
Melissa Elkadi
6b751b2874 Merge branch 'eurecom-develop' into release-3.0 2022-07-28 16:51:55 -07:00
Deokseong "David" Kim
034b64c895 Merge branch 'episys/david/lte_handover' into 'release-3.0'
Cleaning  LTE Handover code

See merge request aburger/openairinterface5g!122
2022-07-28 23:04:12 +00:00
Deokseong "David" Kim
61a93c2374 Cleaning LTE Handover code 2022-07-28 23:04:10 +00:00
Melissa Elkadi
73c8012b52 Merge branch 'eurecom-develop' into release-3.0 2022-07-26 11:39:36 -07:00
David Kim
eca4415287 Inhibit rt scheduler in Ubuntu 20.04. 2022-06-28 17:16:00 -07:00
David Kim
a5c67fac57 Adding mimo config file 2022-06-27 19:09:28 -07:00
Melissa Elkadi
b0d1b9d44f Increasing buffer size for NSA throughput 2022-06-27 19:06:24 -07:00
Melissa Elkadi
4d7958414e This commit fixes UE to UE IP traffic
The bug fixes include, proeprly allocating
for multiple dl_config PDUs for the num_dci_options.
It also includes getting rid of a double free.
It also does not index pdu (from rx_ind) since there
is only one PDU.
It also puts frees back in the check_and_process_dci().
2022-06-24 15:48:45 -07:00
Melissa Elkadi
4d122d5d7c Costmetic change to packing/unpacking 2022-06-24 13:55:25 -07:00
Melissa Elkadi
5228c18981 Removing commented code causing incorrect pack/unpack 2022-06-24 13:05:46 -07:00
Melissa Elkadi
7b39aa61a9 Merge branch 'episys/david/channel_abstraction_on_top_of_MIMO_CSI_Reporting' of gitlab.int-episci.com:aburger/openairinterface5g into episys/david/channel_abstraction_on_top_of_MIMO_CSI_Reporting 2022-06-24 09:51:00 -07:00
David Kim
d785a95a5f Code fix to remove compile warning. 2022-06-23 16:42:33 -07:00
Melissa Elkadi
ff43319fdb TBS + 2 bug fix (not standard compliant for nFAPI header)
Also, added a return 0; for invalid PDU length in the gNB.
This is a bug. We need to understand why the PDU length is
overrun. For now, this avoids indexing past the end of pduP
pointer.
2022-06-23 13:57:19 -07:00
David Kim
4167066f04 Merge remote-tracking branch 'origin/episys/master-sa' into episys/david/channel_abstraction_on_top_of_MIMO_CSI_Reporting 2022-06-21 18:17:15 -07:00
Melissa Elkadi
61232c4557 Merge branch 'eurecom-develop' into episys/master-sa 2022-06-21 17:01:15 -07:00
Melissa Elkadi
5f8b20761b TBS + 2 bug fix (not standard compliant for nFAPI header)
Also, added a return 0; for invalid PDU length in the gNB.
This is a bug. We need to understand why the PDU length is
overrun. For now, this avoids indexing past the end of pduP
pointer.
2022-06-21 16:49:27 -07:00
David Kim
4ad9d66a3c Changed log level. 2022-06-20 18:24:08 -07:00
David Kim
5d4ad105b7 Merge remote-tracking branch 'origin/episys/master-sa' into episys/david/channel_abstraction_on_top_of_MIMO_CSI_Reporting 2022-06-20 11:56:33 -07:00
David Kim
fa8bc0b57c Updated to resolve crash when handling MAC pdus. 2022-06-20 11:26:24 -07:00
David Kim
1341cc35b9 Updated for NR traffic test. 2022-06-16 16:11:34 -07:00
Melissa Elkadi
173b4722fc Merge branch 'eurecom-develop' into episys/master-sa 2022-06-14 06:33:18 -07:00
David Kim
515093ca29 Updated SDAP setting to handle with NSA mode. 2022-06-09 10:10:17 -07:00
Melissa Elkadi
013e70d22d Bug fix in the NSA tunnel interface command
When the develop branch from OAI was merged,
the NSA tunnel interface command was was causing
a Heap-Buffer-Overflow. The filling of the buffer
was of size 500, but the memcpy in the RRC layer
was not matching the buffer size. Now, all buffer
sizes have been updated to be sufficient for the
content and are consistent.
2022-06-08 09:25:21 -07:00
David Kim
640ce7beed Updated to execute multiple UEs.
1. Introduced NR_NUM_SINR instead of NUM_SINR for NR case.
2. Extended Max number of UL PDU, Max number of RA Proc, and Max number of mobiles per gNB.
3. Changed log level to anlaysis for nsa and nr.
4. Fixed compiler warning regarding to data type in the logging of rsrp comparison.
2022-06-06 11:03:09 -07:00
Melissa Elkadi
d704dbec15 Symbol rotation not working properly.
This is a PHY function that we do not
use in our emulate-l1 mode. The previous
develop branch has broken the symbol_rotation
function, which causes the gNB to crash in
NSA mode. For now, we shunt out the functionality,
but an issue will be created in git for the
OAI team to investigate.
2022-06-03 18:07:27 -07:00
Melissa Elkadi
33989c3551 Merge branch 'eurecom-develop' into episys/master-sa 2022-06-03 18:07:13 -07:00
David Kim
6470165730 Fixed compile error when handling usim_data. 2022-06-02 21:56:34 -07:00
David Kim
fc33a75f22 Added AWGN_MIMO2x2 CDLC Bler table.
- Added env variable to refer to this bler table.
- Bler table will be chosen dynamically.
- Area code was used to select proper bler table.
2022-05-30 19:21:19 -07:00
David Kim
0645690f3d Handling edge case of channel info. 2022-05-26 18:26:44 -07:00
David Kim
e9a541a096 Updated csi structure members instead of encoding csi values. 2022-05-26 16:41:11 -07:00
David Kim
ec253251bc Merge branch 'episys/david/handover_step2_handover_execution' into episys/david/updating_MIMO_CSI_report_values 2022-05-26 13:43:30 -07:00
David Kim
ae72632b85 Merge remote-tracking branch 'origin/episys/master-sa' into episys/david/updating_MIMO_CSI_report_values 2022-05-26 13:15:42 -07:00
David Kim
b69a4aaa9b Updated rrc status and SINR value after Handover. 2022-05-25 17:43:41 -07:00
David Kim
fc56972a35 Code cleanup. 2022-05-20 16:35:28 -07:00
David Kim
f898a1724c Merge remote-tracking branch 'origin/episys/master-sa' into episys/david/handover_step2_handover_execution 2022-05-20 12:45:20 -07:00
David Kim
ef37bcf170 Updated pdcp functions to check uplink traffic.
In this commit, we confirm that uplink and downlink IP traffic is working for LTE handover.
The uplink traffic works only up to 3 Mbps, anything more it belongs to  show a lot of loss.
The downlink traffic and pings works well.
The following is additional update in this commit.

1. Used PDCP_COLL_KEY_VALUE to find key using rab_id after handover.
2. Disabled channel modeling in case of handover.
3. Updated rsrq by using rsrp.
2022-05-20 12:07:14 -07:00
David Kim
31437e3185 Updated rlc functions to check downlink traffic.
1. Downlink traffic is working.
2. Set default rlc mode to be AM even in drb case.
3. Code cleanup.
2022-05-18 19:07:07 -07:00
Melissa Elkadi
fb98755a48 Adding LOG_As back to OAI code for EpiSci tests 2022-05-18 09:12:23 -07:00
Melissa Elkadi
b2c07b620d Merge branch 'eurecom-develop' into episys/master-sa 2022-05-18 07:25:32 -07:00
David Kim
d3cda4816d Checking Msg3 size and code cleanup. 2022-05-16 11:20:05 -07:00
David Kim
8aaa384193 Updated sinr to csi to check rsrp. 2022-05-12 08:56:55 -07:00
David Kim
2eed6f18e4 Updated to use RSRP value to trigger handover. 2022-05-06 18:18:43 -07:00
David Kim
c79b681480 Added and updated config file for LTE HO.
1. Two eNB config file updated.
2. Removed lte specific node_number variable to get softmodem params.
3. Checking sfn_sf values for all eNBs.
4. Added phy_id member in phy_channel_params to identify source eNB.
2022-05-02 18:31:45 -07:00
David Kim
15b6259dcc Updated handover RACH Procedure together with code cleanup.
1. Added default case for handling actions in rrc_rlc_config_req.
2. Added a log for analysis purpose for Msg3 in rrc_eNB.
3. Handled RACH procedure to send Msg3 properly from UE.
4. Code cleanup.
2022-04-26 17:10:14 -07:00
David Kim
d3e96c6769 Updated pdcp and rlc layer config to reset for Handover.
1. Config reset in pdcp and rlc layer.
2. Adding new rb for target eNB.
3. eNB RRC layer received RRCConnectionReconfigurationComplete.
4. Need to setup further for NAS.
2022-04-22 10:07:36 -07:00
Melissa Elkadi
eef2fb907b Merge branch 'eurecom-develop' into episys/master-sa 2022-04-19 07:18:57 -07:00
Melissa Elkadi
29a68836fa Merge branch 'episys/master-sa' of gitlab.int-episci.com:aburger/openairinterface5g into episys/master-sa 2022-04-19 06:52:53 -07:00
David Kim
4b5cf91125 Added Msg4 with empty payload and received harq ack. 2022-04-18 15:58:05 -07:00
David Kim
e66640f5ab Updated ulsch_buffer for Handover Msg3.
1. Changed ulsch_buffer as static variable.
2. Swapped crnti bytes in eNB.
3. Changed status after sending Msg3 in UE.
2022-04-15 11:45:12 -07:00
David Kim
01921cf9f0 We receive the RAR and send Msg3. Fixes include:
- Properly providing crnti value to mac_rlc_status_ind() for HO (this
allowed us to be able to get the Msg3 from the RRC -> PDCP ->
RLC -> MAC). We were able to remove the hack we added in
the previous commit for BSR_Bytes.
- The unpacked rnti value from the
mobility info was saved incorrectly (bug fix)
- RX_IND and CRC_IND for msg3 crnti
had to be updated to the correct expected value.
- Currently, the ULSCH header is clearly incorrect.
- We can possibly try to call ue_get_sdu() instead.
2022-04-14 14:33:38 -07:00
David Kim
d30b232aeb Receiving RAR but sending incorrect Msg3.
- We started utilizing the HO case in the ue_get_rach
- We hacked the code to have BSR_Bytes > 0
- The BSR_Bytes is not properly set by RLC
- We then saw RAR received after shunting out RLC handling
- We are building msg3 before RAR
- We are sending "msg 3" = RX_IND after RAR
- The eNB does not like the Msg3 (It is CCCH - should be DCCH)
- The next steps are to look at why the RX is CCCH and not DCCH
- We can look at the RX we build in the UE to make sure its correct
2022-04-13 13:34:55 -07:00
David Kim
f9d93403d0 Updated preamble index for handover. 2022-04-12 17:51:27 -07:00
David Kim
2c84fdbea3 nFAPI queue reset for handover. 2022-04-07 19:05:34 -07:00
David Kim
61ebbc3403 Detach from source eNB. 2022-04-07 13:56:15 -07:00
Melissa
4d8615c4fa Merge branch 'episys/rt_sched_or_sanitizer' into 'episys/master-sa'
pthread_create and the RT scheduler together are incompatible in Ubuntu 18.04+

See merge request aburger/openairinterface5g!119
2022-04-06 22:06:41 +00:00
Melissa
55eb112ab0 pthread_create and the RT scheduler together are incompatible in Ubuntu 18.04+ 2022-04-06 22:06:40 +00:00
David Kim
9fa16cd5b9 Inactivating X2U interface. 2022-04-06 11:53:44 -07:00
Melissa Elkadi
6101792f4a Merge branch 'episys/master-sa' into episys/rt_sched_or_sanitizer 2022-04-05 14:23:16 -07:00
David Kim
b931c1b008 Updated the 4th byte value of cellIdentitys(28 bits length). 2022-04-04 16:49:34 -07:00
Melissa Elkadi
6aa1ad83a6 pthread_create and the RT scheduler together are incompatible.
When we run with the RT scheduler and the address santizer in
Ubuntu 18.04, pthread_create will hang and never create threads.
2022-04-04 14:55:50 -07:00
David Kim
634f7dc1e6 Updated to fix asn encoding error. 2022-04-04 10:44:09 -07:00
David Kim
80420d7cba Enabled ASAN log and print. 2022-04-01 15:46:23 -07:00
David Kim
b62d2fcf08 Adjusted to one udp interface. 2022-03-31 20:06:03 -07:00
David Kim
e5f851b01e Updated config file for handover. 2022-03-30 10:33:46 -07:00
David Kim
12cecf668a Enabled mreasurement report. 2022-03-25 09:47:58 -07:00
David Kim
f92a972aa5 Adjusted the delta of port numbering between eNBs. 2022-03-25 09:45:48 -07:00
David Kim
756ff02fb7 Updated eNB config for X2C in lte handover. 2022-03-23 17:42:35 -07:00
David Kim
1acb2fe894 Added additional UDP connection for handover. 2022-03-23 15:46:50 -07:00
Melissa Elkadi
4694664470 Merge branch 'eurecom-develop' into episys/master-sa 2022-03-22 16:59:25 -07:00
David Kim
10c992bb27 Added AssertFatal for operation of eNB node_number. 2022-03-22 16:03:59 -07:00
David Kim
5c443ee7a5 code cleanup when using node_number. 2022-03-22 15:56:11 -07:00
David Kim
2785c83a90 Added vnf p7 port arguement when calling configure_nfapi_vnf. 2022-03-22 15:48:56 -07:00
David Kim
a7f35bba02 code cleanup. 2022-03-22 15:43:10 -07:00
David Kim
cb5f8919e4 Fixed argument format in function. 2022-03-22 15:29:33 -07:00
David Kim
16371a8f5d Updated PDCP config for multiple eNB by using node_number.
Updated target eNB's config for nFAPI connection.
2022-03-22 13:15:58 -07:00
David Kim
98ac49f1bb Adding update from episci/master-sa. 2022-03-15 16:33:45 -07:00
David Kim
5006fd48d8 Adding one more eNB config file for LTE handover. 2022-03-15 16:23:34 -07:00
David Kim
a389eb8fd6 Function reallocation for downlink cqi value. 2022-03-09 12:21:27 -08:00
David Kim
c68640f6f7 Code cleanup by removing some added logs. 2022-03-09 12:02:56 -08:00
David Kim
2695df5f31 Updated cqi value setting. 2022-03-09 11:51:49 -08:00
David Kim
fd4dbbfb35 Updated for MIMO CSI Reporting. 2022-03-09 10:55:10 -08:00
David Kim
5902aaf138 Updated pdsch_AntennaPorts = 2. 2022-03-08 17:53:39 -08:00
David Kim
fc2ba4f4bd Removed duplicated semicolon at the end of line. 2022-03-08 17:51:23 -08:00
David Kim
d50dae5005 Cleaned code by removing logs. 2022-03-08 17:50:46 -08:00
David Kim
e883528dd1 Added zero pad in reporting PMI in nrUE. 2022-03-08 17:49:38 -08:00
David Kim
b1f721503e Added CSI report signaling with default values. 2022-03-08 17:43:09 -08:00
David Kim
c0e71341a5 Merge remote-tracking branch 'eurocom/tdd25period_for_MR' into episys/david/merge_develop 2022-03-08 11:22:18 -08:00
Melissa Elkadi
f2b9d369bd Reveting hack that was added to master-sa 2022-03-08 10:56:23 -08:00
Melissa
b1a1d1d0dd Merge branch 'error-checking-ul-tti-req' into 'episys/master-sa'
Clean up to nFAPI and error checking UL_TTI_REQ n_pdus

See merge request aburger/openairinterface5g!115
2022-03-08 16:48:53 +00:00
Melissa Elkadi
51e56f74d8 Merge remote-tracking branch 'eurecom/episys-throughput-updates-and-downlink-siso-cm' into episys/master-sa 2022-03-07 12:16:37 -08:00
Melissa Elkadi
a34ce559a4 Removing untracked/unnecessary conf files 2022-03-07 11:31:17 -08:00
Melissa Elkadi
8bf7e77b0e Merge branch 'episys-throughput-updates-and-downlink-siso-cm' into episys/master-sa
This commit includes resolutions for MR comments from OAI
2022-03-07 11:28:55 -08:00
Melissa Elkadi
7b633b141f Merge branch 'eurecom-develop' into episys/master-sa 2022-03-07 09:09:18 -08:00
Melissa Elkadi
95dbe3089e Adding min_rxtxtime to internal proxy conf file 2022-03-01 08:27:59 -08:00
Melissa Elkadi
ee2f7c8a5c Merge branch 'eurecom-develop' into episys/master-sa 2022-03-01 07:45:48 -08:00
249 changed files with 47267 additions and 8806 deletions

View File

@@ -775,7 +775,6 @@ add_library(UTIL
set(SECU_OSA_SRC
${OPENAIR2_DIR}/UTIL/OSA/osa_key_deriver.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eea.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
@@ -1178,7 +1177,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/filt16a_32.c
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_measurements_gNB.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
@@ -1205,10 +1203,15 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_nr.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/pss_nr.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/sss_nr.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/pss_nr_sl.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/sss_nr_sl.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_generate_psbch_dmrs_sl.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/psbch_nr_sl.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pbch.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psbch.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
@@ -1229,7 +1232,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold_ue.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/filt16a_32.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
@@ -1355,7 +1357,6 @@ set(NR_PDCP_SRC
#of reusing code of osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
)
set(NR_SDAP_SRC
@@ -2440,7 +2441,19 @@ target_link_libraries(nr_pbchsim PRIVATE
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
#PUCCH ---> Prashanth
add_executable(nr_psbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(nr_psbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
)
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_executable(nr_pucchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
@@ -2571,7 +2584,7 @@ if (${T_TRACER})
lte-softmodem lte-uesoftmodem nr-softmodem
nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7
ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim
syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim
syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_psbchsim nr_pucchsim
nr_ulschsim ldpctest polartest smallblocktest cu_test du_test
#all "add_library" definitions
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap

View File

@@ -36,7 +36,6 @@ pipeline {
label nodeExecutor
}
options {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
ansiColor('xterm')
@@ -425,28 +424,26 @@ pipeline {
}
}
}
//avra is offline, re-enable once it is available
//stage ("T1-Offload-Test") {
// when { expression {do5Gtest} }
// steps {
// script {
// triggerSlaveJob ('RAN-T1-Offload-Test', 'T1-Offload-Test')
// }
// }
// post {
// always {
// script {
// finalizeSlaveJob('RAN-T1-Offload-Test')
// }
// }
// failure {
// script {
// currentBuild.result = 'FAILURE'
// }
// }
// }
//}
stage ("Interop-F1") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-Interop-F1', 'Interop-F1')
}
}
post {
always {
script {
finalizeSlaveJob('RAN-Interop-F1')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
}
}
stage ("DockerHub-Push") {

View File

@@ -61,7 +61,6 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
timestamps()
ansiColor('xterm')
lock(extra: lockResources)

View File

@@ -55,7 +55,6 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
timestamps()
ansiColor('xterm')
lock(extra: lockResources)

View File

@@ -36,7 +36,6 @@ pipeline {
label nodeExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -61,7 +61,6 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -50,7 +50,6 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -52,7 +52,6 @@ def StatusForDb = ""
pipeline {
agent {label pythonExecutor}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -63,7 +63,6 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -63,7 +63,6 @@ pipeline {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock(extra: lockResources)
}

View File

@@ -0,0 +1,280 @@
/* UE simulator configuration file version 2021-06-17
* LTE / 5G Non StandAlone
* Copyright (C) 2019-2021 Amarisoft
*/
{
#define N_ANTENNA_DL 2
#define TDD 1
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
log_filename: "/tmp/ue.log",
/* Enable remote API and Web interface */
com_addr: "0.0.0.0:9002",
include "rf_driver/1chan.cfg",
/* If true, allow the simulation of several UEs at the same time and
allow dynamic UE creation from remote API */
cell_groups: [{
group_type: "nr",
multi_ue: true,
cells: [{
rf_port: 0,
bandwidth: 20,
band: 78,
dl_nr_arfcn:627360,
ssb_nr_arfcn:627360,
subcarrier_spacing: 30,
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: 1,
rx_to_tx_latency:2,
}],
}],
/* UE capabilities */
/* USIM data */
ue_list: [
{
"ue_id" : 1,
"imsi": "208970000000111",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 2,
"imsi": "208970000000112",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 3,
"imsi": "208970000000113",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 4,
"imsi": "208970000000114",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 5,
"imsi": "208970000000115",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 6,
"imsi": "208970000000116",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 7,
"imsi": "208970000000117",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 8,
"imsi": "208970000000118",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 9,
"imsi": "208970000000119",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 10,
"imsi": "208970000000120",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 11,
"imsi": "208970000000121",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 12,
"imsi": "208970000000122",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 13,
"imsi": "208970000000123",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 14,
"imsi": "208970000000124",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 15,
"imsi": "208970000000125",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
{
"ue_id" : 16,
"imsi": "208970000000126",
"K": "fec86ba6eb707ed08905757b1bb44b8f",
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
default_pdu_session_snssai: { sst: 1, },
tun_setup_script: "ue-ifup",
},
],
}

View File

@@ -49,7 +49,7 @@ adb_ue_2:
amarisoft_ue:
Host: amariue
InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-asue.cfg &
InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897.cfg &
TermScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"quit"}'
amarisoft_ue_1:
Host: amariue

View File

@@ -31,6 +31,9 @@ import subprocess as sp
import os
import paramiko
import uuid
import sys
SSHTIMEOUT=7
# helper that returns either LocalCmd or RemoteCmd based on passed host name
def getConnection(host, d=None):
@@ -123,13 +126,21 @@ class LocalCmd(Cmd):
class RemoteCmd(Cmd):
def __init__(self, hostname, d=None):
cIdx = 0
logging.getLogger('paramiko').setLevel(logging.ERROR) # prevent spamming through Paramiko
self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
cfg = RemoteCmd._lookup_ssh_config(hostname)
self.client.connect(**cfg)
self.cwd = d
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
while cIdx < 3:
try:
self.client.connect(**cfg)
return
except:
logging.error(f'Could not connect to {hostname}, tried for {cIdx} time')
cIdx +=1
raise Exception ("Error: max retries, did not connect to host")
def _lookup_ssh_config(hostname):
ssh_config = paramiko.SSHConfig()
@@ -142,7 +153,7 @@ class RemoteCmd(Cmd):
ucfg = ssh_config.lookup(hostname)
if 'identityfile' not in ucfg or 'user' not in ucfg:
raise KeyError(f'no identityfile or user in SSH config for host {hostname}')
cfg = {'hostname':hostname, 'username':ucfg['user'], 'key_filename':ucfg['identityfile']}
cfg = {'hostname':hostname, 'username':ucfg['user'], 'key_filename':ucfg['identityfile'], 'timeout':SSHTIMEOUT}
if 'hostname' in ucfg:
cfg['hostname'] = ucfg['hostname'] # override user-given hostname with what is in config
if 'port' in ucfg:

View File

@@ -81,7 +81,7 @@ class Module_UE:
c = cls_cmd.RemoteCmd(self.host)
response = c.run(cmd, silent=silent)
c.close()
return response.stdout
return response
#-----------------$
#PUBLIC Methods$
@@ -95,7 +95,11 @@ class Module_UE:
if self.cmd_dict["detach"]:
self._command(self.cmd_dict["detach"], silent=True)
self._command(self.cmd_dict["terminate"], silent=True)
self._command(self.cmd_dict["initialize"])
ret = self._command(self.cmd_dict["initialize"])
logging.info(f'For command: {ret.args} | return output: {ret.stdout} | Code: {ret.returncode}')
# Here each UE returns differently for the successful initialization, requires check based on UE
return ret.returncode == 0
def terminate(self):
self._command(self.cmd_dict["terminate"])
@@ -122,9 +126,9 @@ class Module_UE:
self._command(self.cmd_dict["detach"])
time.sleep(5)
if ip:
logging.debug(f'\u001B[1mUE IP Address is {ip}\u001B[0m')
logging.debug(f'\u001B[1mUE IP Address for UE {self.module_name} is {ip}\u001B[0m')
else:
logging.debug('\u001B[1;37;41mUE IP Address Not Found!\u001B[0m')
logging.debug(f'\u001B[1;37;41mUE IP Address for UE {self.module_name} Not Found!\u001B[0m')
return ip
def detach(self):
@@ -133,7 +137,7 @@ class Module_UE:
def check(self):
cmd = self.cmd_dict["check"]
if cmd:
return self._command(cmd)
return self._command(cmd).stdout
else:
logging.warning(f"requested status check of UE {self.getName()}, but operation is not supported")
return f"UE {self.getName()} does not support status checking"
@@ -160,7 +164,7 @@ class Module_UE:
def getIP(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output)
result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
if result and result.group('ip'):
ip = result.group('ip')
return ip
@@ -168,12 +172,12 @@ class Module_UE:
def checkMTU(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
result = re.search('mtu (?P<mtu>[0-9]+)', output)
result = re.search('mtu (?P<mtu>[0-9]+)', output.stdout)
if result and result.group('mtu') and int(result.group('mtu')) == self.MTU:
logging.debug('\u001B[1mUE Module NIC MTU is ' + str(self.MTU) + ' as expected\u001B[0m')
logging.debug(f'\u001B[1mUE Module {self.module_name} NIC MTU is {self.MTU} as expected\u001B[0m')
return True
else:
logging.debug('\u001B[1;37;41m Incorrect Module NIC MTU or MTU not found! Expected: ' + str(self.MTU) + '\u001B[0m')
logging.debug(f'\u001B[1;37;41m UE module {self.module_name} has incorrect Module NIC MTU or MTU not found! Expected: {self.MTU} \u001B[0m')
return False
def getName(self):

View File

@@ -295,10 +295,13 @@ class OaiCiTest():
def InitializeUE(self, HTML):
ues = [cls_module_ue.Module_UE(n.strip()) for n in self.ue_ids]
messages = []
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [executor.submit(ue.initialize) for ue in ues]
for f, ue in zip(futures, ues):
uename = f'UE {ue.getName()}'
messages.append(f'{uename}: initialized' if f.result() else f'{uename}: ERROR during Initialization')
[f.result() for f in futures]
messages = [f'UE {ue.getName()}: initialized' for ue in ues]
HTML.CreateHtmlTestRowQueue('N/A', 'OK', messages)
@@ -1273,7 +1276,7 @@ class OaiCiTest():
logging.debug("Iperf in UL requested")
cmd = cls_cmd.getConnection(EPC.IPAddress)
cmd.run(f'rm {EPC.SourceCodePath}/{server_filename}')
cmd.run(f'{cn_iperf_prefix} iperf -s {udpSwitch} -1 -t {iperf_time * 1.5} {port} &> {EPC.SourceCodePath}/{server_filename} &')
cmd.run(f'{cn_iperf_prefix} iperf -s {udpSwitch} -t {iperf_time * 1.5} {port} &> {EPC.SourceCodePath}/{server_filename} &')
cmd.close()
cmd = cls_cmd.getConnection(ue.getHost())

View File

@@ -16,7 +16,7 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 0x1;
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst =0x1; }) });
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ({ sst =0x1; }) });
nr_cellid = 12345678L

View File

@@ -263,7 +263,7 @@ class RANManagement():
cmd = cls_cmd.getConnection(self.node)
ret = cmd.run(self.command)
cmd.close()
logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode}')
logging.debug(f"Custum command : {self.command} on node : {self.node} returnCode : {ret.returncode}")
status = 'OK'
message = []
if ret.returncode != 0 and not self.command_fail:

341
ci-scripts/run_sl_test.py Executable file
View File

@@ -0,0 +1,341 @@
#!/usr/bin/env python3
#
# Automated tests for running 5G NR Sidelink SyncRef UE and/or Nearby UE.
# The following is an example to run remote machine (nearby) three times.
# The syncref UE is launched on the current machine, and a single
# nearby UE is launched on the machine specified by the --host and
# --user flags. The -r will enable this simulation to be repeated
# three times.
#
# python3 run_sl_test.py --user account --host 10.1.1.68 -r 3
#
# The following is an example to run just a Sidelink Nearby UE.
# By specifying -l nearby, only the nearby UE will be launched
# on the machine specified by the --host and --user flags.
# The -r will enable this simulation to be repeated two times.
#
# python3 run_sl_test.py -l nearby --user account --host 10.1.1.68 -r 2
#
# See `--help` for more information.
#
import os
import sys
import argparse
import logging
import time
import re
import glob
import subprocess
from subprocess import Popen
import threading
from typing import Dict
from queue import *
from sl_check_log import LogChecker
HOME_DIR = os.path.expanduser( '~' )
# ----------------------------------------------------------------------------
# Command line argument parsing
parser = argparse.ArgumentParser(description="""
Automated tests for 5G NR Sidelink simulations
""")
parser.add_argument('--launch', '-l', default='both', choices='syncref nearby both'.split(), help="""
Sidelink UE type to launch test scenario (default: %(default)s)
""")
parser.add_argument('--host', default='10.1.1.80', type=str, help="""
Nearby Host IP (default: %(default)s)
""")
parser.add_argument('--user', '-u', default='zaid', type=str, help="""
User id in Nearby Host (default: %(default)s)
""")
parser.add_argument('--repeat', '-r', default=1, type=int, help="""
The number of repeated test iterations (default: %(default)s)
""")
parser.add_argument('--basic', '-b', action='store_true', help="""
Basic test with basic shell commands
""")
parser.add_argument('--commands', default='sl_cmds.txt', help="""
The USRP Commands .txt file (default: %(default)s)
""")
parser.add_argument('--duration', '-d', metavar='SECONDS', type=int, default=30, help="""
How long to run the test before stopping to examine the logs
""")
parser.add_argument('--nid1', type=int, default=10, help="""
Nid1 value
""")
parser.add_argument('--nid2', type=int, default=1, help="""
Nid2 value
""")
parser.add_argument('--log-dir', default=HOME_DIR, help="""
Where to store log files
""")
parser.add_argument('--compress', action='store_true', help="""
Compress the log files in the --log-dir
""")
parser.add_argument('--no-run', '-n', action='store_true', help="""
Don't run the test, only examine the logs in the --log-dir
directory from a previous run of the test
""")
parser.add_argument('--debug', action='store_true', help="""
Enable debug logging (for this script only)
""")
parser.add_argument('--test', '-t', default='usrp', choices='psbchsim rfsim usrp'.split(), help="""
The kind of test scenario to run. The options include psbchsim, rfsim, or usrp. (default: %(default)s)
""")
OPTS = parser.parse_args()
del parser
logging.basicConfig(level=logging.DEBUG if OPTS.debug else logging.INFO,
format='>>> %(name)s: %(levelname)s: %(message)s')
LOGGER = logging.getLogger(os.path.basename(sys.argv[0]))
# ----------------------------------------------------------------------------
def redirect_output(cmd: str, filename: str) -> str:
cmd += ' >{} 2>&1'.format(filename)
return cmd
def thread_delay(thread_name: str, delay: int) -> None:
count = 0
while count < 1:
time.sleep(delay)
count += 1
class Command:
"""
Parsing USRP commands file
"""
def __init__(self, filename) -> None:
self.check_user()
self.filename = self.check_file(filename)
self.parse_commands()
def check_user(self) -> None:
if OPTS.test != 'usrp': return
if OPTS.launch != 'syncref' and OPTS.user == '':
LOGGER.error("--user followed by [user id] is mandatory to connect to remote machine")
sys.exit(1)
def check_file(self, filename) -> str:
data_file = glob.glob(filename)
if data_file:
return filename
else:
LOGGER.error(f'The file {filename} does not exist!')
sys.exit(1)
def parse_commands(self) -> None:
"""
Scan the provided commands file.
"""
self.launch_cmds: Dict[str, str] = {}
if OPTS.test == 'usrp':
launch_cmds_re = re.compile(r'^\s*(\S*)usrp\S*\s*=\s*((\S+\s*)*)')
elif OPTS.test == 'rfsim':
launch_cmds_re = re.compile(r'^\s*(\S*)rfsim\S*\s*=\s*((\S+\s*)*)')
elif OPTS.test == 'psbchsim':
launch_cmds_re = re.compile(r'^\s*(\S*)psbchsim\S*\s*=\s*((\S+\s*)*)')
else:
LOGGER.error("Provided test option not valid! %s", OPTS.test)
exit(1)
with open(self.filename, 'rt') as fh:
nearby_cmd_continued = False
syncref_cmd_continued = False
for line in fh:
if line == '\n': continue
match = launch_cmds_re.match(line)
if match:
host_role = match.group(1)
launch_cmds = match.group(2)
if host_role.lower().startswith('nearby'):
nearby_cmd_continued = True
continue
if host_role.lower().startswith('syncref'):
syncref_cmd_continued = True
continue
elif nearby_cmd_continued:
launch_cmds += line
if not line.strip().endswith('\\'):
self.launch_cmds['nearby'] = launch_cmds
LOGGER.debug('Nearby cmd is %s', launch_cmds)
nearby_cmd_continued = False
continue
elif syncref_cmd_continued:
launch_cmds += line
if not line.strip().endswith('\\'):
self.launch_cmds['syncref'] = launch_cmds
LOGGER.debug('Syncref cmd is %s', launch_cmds)
syncref_cmd_continued = False
continue
else:
LOGGER.debug('Unmatched line %r', line)
continue
if self.launch_cmds == {}:
LOGGER.error(f'usrp commands are not found in file: {self.filename} ')
exit()
class TestThread(threading.Thread):
"""
Represents TestThread
"""
def __init__(self, queue, commands, passed, log_agent):
threading.Thread.__init__(self)
self.queue = queue
self.commands = commands
self.passed = passed
self.delay = 0
self.log_file = log_agent.txlog_file_path
self.log_agent = log_agent
def run(self):
if self.queue.empty() == True:
LOGGER.error("Queue is empty!")
sys.exit(1)
try:
while not self.queue.empty():
job = self.queue.get()
if "nearby" == job:
thread_delay(job, delay = 0)
self.launch_nearby(job)
if "syncref" == job and not OPTS.no_run:
thread_delay(job, delay = self.delay)
self.launch_syncref(job)
self.queue.task_done()
except Exception as inst:
LOGGER.info(f"Failed to operate on job with type {type(inst)} and args {inst.args}")
def launch_syncref(self, job) -> Popen:
LOGGER.info('Launching SyncRef UE')
if OPTS.basic: cmd = redirect_output('uname -a', self.log_file)
else: cmd = self.commands.launch_cmds[job]
proc = Popen(cmd, shell=True)
LOGGER.info(f"syncref_proc = {proc}")
if not OPTS.basic and not OPTS.no_run:
LOGGER.info(f"Process running... {job}")
time.sleep(OPTS.duration)
self.kill_process("syncref", proc)
def launch_nearby(self, job, host=OPTS.host, user=OPTS.user) -> Popen:
LOGGER.info('#' * 42)
LOGGER.info('Launching Nearby UE')
if OPTS.basic: cmd = redirect_output('uname -a', self.log_file)
else: cmd = self.commands.launch_cmds[job]
if OPTS.test == 'usrp':
cmd = cmd[:-1] + f' -d {OPTS.duration} --nid1 {OPTS.nid1} --nid2 {OPTS.nid2}'
proc = Popen(["ssh", f"{user}@{host}", cmd],
shell=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
LOGGER.info(f"nearby_proc = {proc}")
remote_output = proc.stdout.readlines()
if remote_output == []:
nearby_result = proc.stderr.readlines()
else:
nearby_result = remote_output
self.kill_process("nearby", proc)
if nearby_result:
self.find_nearby_result_metric(nearby_result)
else:
proc = Popen(cmd, shell=True)
LOGGER.info(f"nearby_proc = {proc}")
if not OPTS.basic and not OPTS.no_run:
LOGGER.info(f"Process running... {job}")
time.sleep(OPTS.duration)
self.kill_process("nearby", proc)
nearby_result = self.log_agent.analyze_nearby_logs(OPTS.nid1, OPTS.nid2)
if nearby_result:
self.find_nearby_result_metric(nearby_result)
def find_nearby_result_metric(self, remote_log):
result_metric = None
for line in remote_log:
if type(line) is not str:
line = line.decode()
if OPTS.test == 'usrp':
LOGGER.info(line.strip())
# 'SyncRef UE found. RSRP: -100 dBm/RE. It took {delta_time_s} seconds'
if 'SyncRef UE found' in line:
fields = line.split(maxsplit=12)
if len(fields) > 6:
ssb_rsrp = float(fields[-6])
sync_duration = float(fields[-2])
counting_duration = sync_duration - self.delay
result_metric = (ssb_rsrp, sync_duration, counting_duration)
self.passed += [result_metric]
return
def kill_process(self, job: str, proc: Popen) -> None:
# Wait for the processes to end
LOGGER.info(f'kill main simulation processes... {job}')
cmd = ['sudo', 'killall']
cmd.append('-KILL')
if proc:
cmd.append('nr-uesoftmodem')
if "syncref" == job:
subprocess.run(cmd)
LOGGER.info(f'Waiting for PID proc.pid for {job}')
proc.kill()
proc.wait()
LOGGER.info(f'kill main simulation processes...done for {job}')
# ----------------------------------------------------------------------------
def main() -> int:
commands = Command(OPTS.commands)
log_agent = LogChecker(OPTS, LOGGER)
LOGGER.debug(f'Number of iterations {OPTS.repeat}')
if commands.launch_cmds is not None:
for role, cmd in commands.launch_cmds.items():
LOGGER.debug(f'{role} UE: {cmd}')
jobs = ['nearby', 'syncref'] if OPTS.launch == 'both' else [OPTS.launch]
passed_metric = []
num_tx_ssb = []
num_passed = 0
for i in range(OPTS.repeat):
threads = []
queue = Queue()
for job in jobs:
queue.put(job)
th = TestThread(queue, commands, passed_metric, log_agent)
th.setDaemon(True)
th.start()
threads.append(th)
for th in threads:
th.join()
if num_passed != len(passed_metric):
# Examine the logs to determine if the test passed
(ssb_rsrp, sync_duration, counting_duration) = passed_metric[-1]
num_ssb = log_agent.analyze_syncref_logs(counting_duration)
num_tx_ssb += [num_ssb]
LOGGER.info(f"Trial {i+1}/{OPTS.repeat} PASSED. {num_ssb} SSB(s) were generated. Measured {ssb_rsrp} RSRP (dbm/RE)")
else:
LOGGER.info(f"Failure detected during {i+1}/{OPTS.repeat} trial(s).")
num_passed = len(passed_metric)
LOGGER.info('#' * 42)
LOGGER.info(f"Number of passed = {len(passed_metric)}/{OPTS.repeat}")
if len(num_tx_ssb) > 0:
LOGGER.info(f"Avg number of SSB = {sum(num_tx_ssb) / len(num_tx_ssb)} ({num_tx_ssb})")
if len(passed_metric) > 0:
LOGGER.info(f"Avg SSB RSRP = {sum([result[0] for result in passed_metric]) / len(passed_metric)}")
LOGGER.info(f"Avg Sync duration (seconds) = {sum([result[1] for result in passed_metric]) / len(passed_metric)}")
return 0
sys.exit(main())

112
ci-scripts/sl_check_log.py Executable file
View File

@@ -0,0 +1,112 @@
#!/usr/bin/env python3
import os
import bz2
import logging
from typing import Optional, List, Generator
class LogChecker():
def __init__(self, OPTS, LOGGER):
self.OPTS = OPTS
self.LOGGER = LOGGER
self.rxlog_file_path = os.path.join(OPTS.log_dir, 'rx.log')
self.txlog_file_path = os.path.join(OPTS.log_dir, 'tx.log')
def get_lines(self, filename: str) -> Generator[str, None, None]:
"""
Yield each line of the given log file (.bz2 compressed log file if -c flag is used.)
"""
fh = bz2.open(filename, 'rb') if self.OPTS.compress else open(filename, 'rb')
for line_bytes in fh:
line = line_bytes.decode('utf-8', 'backslashreplace')
line = line.rstrip('\r\n')
yield line
def get_analysis_messages_nearby(self, filename: str) -> Generator[str, None, None]:
"""
Finding all logs in the log file with X fields for log parsing optimization
"""
self.LOGGER.info('Scanning %s', filename)
for line in self.get_lines(filename):
#796821.854505 [NR_PHY] SyncRef UE found with Nid1 10 and Nid2 1 SS-RSRP 100 dBm/RE
#796811.532881 [NR_PHY] nrUE configured
fields = line.split(maxsplit=10)
if len(fields) == 11 or len(fields) == 4:
yield line
def analyze_nearby_logs(self, exp_nid1: int, exp_nid2: int) -> bool:
found = set()
est_nid1, est_nid2, time_start_s, time_end_s = -1, -1, -1, -1
ssb_rsrp = 0
log_file = self.rxlog_file_path
result = None
if self.OPTS.compress:
log_file = f'{log_file}.bz2'
for line in self.get_analysis_messages_nearby(log_file):
#796821.854505 [NR_PHY] SyncRef UE found with Nid1 10 and Nid2 1 SS-RSRP -100 dBm/RE
#796811.532881 [NR_PHY] nrUE configured
if 'SyncRef UE found' in line and 'Nid1' in line and 'Nid2' in line:
num_split = 13 if 'RSRP' in line else 10
fields = line.split(maxsplit=num_split)
est_nid1 = int(fields[7])
est_nid2 = int(fields[10])
if 'RSRP' in line:
ssb_rsrp = int(fields[12])
found.add('found')
time_end_s = float(fields[0])
break
if time_start_s == -1 and 'nrUE configured' in line:
fields = line.split(maxsplit=3)
time_start_s = float(fields[0])
self.LOGGER.debug('found: %r', found)
if len(found) != 1:
self.LOGGER.error(f'Failed -- No SyncRef UE found.')
return
elif exp_nid1 != est_nid1 or exp_nid2 != est_nid2:
self.LOGGER.error(f'Failed -- found SyncRef UE Nid1 {est_nid1}, Ni2 {est_nid2}, expecting Nid1 {exp_nid1}, Nid2 {exp_nid2}')
return
if time_start_s == -1:
self.LOGGER.error(f'Failed -- No start time found! Fix log and re-run!')
return
delta_time_s = time_end_s - time_start_s
result = f'SyncRef UE found. RSRP: {ssb_rsrp} dBm/RE. It took {delta_time_s} seconds'
self.LOGGER.info(result)
return [result]
def get_analysis_messages_syncref(self, filename: str) -> Generator[str, None, None]:
"""
Finding all logs in the log file with X fields for log parsing optimization
"""
self.LOGGER.info('Scanning %s', filename)
for line in self.get_lines(filename):
#796811.532881 [NR_PHY] nrUE configured
#796821.854505 [NR_PHY] PSBCH SL generation started
fields = line.split(maxsplit=5)
if len(fields) == 4 or len(fields) == 6 :
yield line
def analyze_syncref_logs(self, counting_delta: float) -> int:
time_start_s, time_end_s = -1, -1
log_file = self.txlog_file_path
sum_ssb = 0
if self.OPTS.compress:
tx_log_file = f'{log_file}.bz2'
for line in self.get_analysis_messages_syncref(log_file):
#796811.532881 [NR_PHY] nrUE configured
#796821.854505 [NR_PHY] PSBCH SL generation started
if time_start_s == -1 and 'nrUE configured' in line:
fields = line.split(maxsplit=2)
time_start_s = float(fields[0])
time_end_s = time_start_s + counting_delta
if 'PSBCH SL generation started' in line:
fields = line.split(maxsplit=2)
time_st = float(''.join([ch for ch in fields[0] if ch.isnumeric() or ch =='.']))
if time_st < time_end_s:
sum_ssb += 1
return sum_ssb

45
ci-scripts/sl_cmds.txt Normal file
View File

@@ -0,0 +1,45 @@
# The lines containing 'usrp' and starts with 'syncref' or 'nearby' will be valid until it does not contain backspace.
####################
#### USRP ####
####################
### RX Nearby UE ###
nearby_usrp_cmd = cd $HOME/openairinterface5g/ci-scripts; \
python3 sl_rx_agent.py --cmd \
'sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 -r 106 --numerology 1 --band 38 --SLC 2600000000 --ue-rxgain 90 \
--usrp-args "type=n3xx,addr=192.168.20.2,subdev=A:0,master_clock_rate=122.88e6" \
--log_config.global_log_options time,nocolor \
> ~/rx.log 2>&1'
### TX SyncRef UE ###
syncref_usrp_cmd = \
sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sl-mode 2 --sync-ref -r 106 --numerology 1 --band 38 --SLC 2600000000 --ue-txgain 8 \
--usrp-args "type=n3xx,addr=192.168.10.2,subdev=A:0,master_clock_rate=122.88e6" \
--log_config.global_log_options time,nocolor\
> ~/tx.log 2>&1
####################
#### RFSIM ####
####################
### RX Nearby UE ###
nearby_rfsim_cmd = \
sudo -E RFSIMULATOR=127.0.0.1 \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--rfsim --sl-mode 2 --rfsimulator.serverport 4048 \
--log_config.global_log_options time,nocolor \
> ~/rx.log 2>&1
### TX SyncRef UE ###
syncref_rfsim_cmd = \
sudo -E RFSIMULATOR=server \
$HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
--sync-ref --rfsim --sl-mode 2 --rfsimulator.serverport 4048 \
--log_config.global_log_options time,nocolor \
> ~/tx.log 2>&1

218
ci-scripts/sl_rx_agent.py Executable file
View File

@@ -0,0 +1,218 @@
#!/usr/bin/env python3
#
# Automated tests for running 5G NR Sidelink Nearby UE.
# The following is an example to run this script.
#
# python3 sl_rx_agent.py \
# --cmd 'sudo -E LD_LIBRARY_PATH=$HOME/openairinterface5g/cmake_targets/ran_build/build:$LD_LIBRARY_PATH \
# $HOME/openairinterface5g/cmake_targets/ran_build/build/nr-uesoftmodem \
# --sl-mode 2 -r 106 --numerology 1 --band 38 -C 2600000000 --ue-rxgain 90 \
# --usrp-args "type=n3xx,addr=192.168.20.2,subdev=A:0,master_clock_rate=122.88e6" \
# > ~/rx.log 2>&1' \
# --nid1 10 --nid2 1
#
# See `--help` for more information.
#
import os
import sys
import argparse
import logging
import time
import glob
import bz2
import subprocess
from subprocess import Popen
from typing import Optional, List
from sl_check_log import LogChecker
HOME_DIR = os.path.expanduser( '~' )
# ----------------------------------------------------------------------------
# Command line argument parsing
parser = argparse.ArgumentParser(description="""
Automated tests for 5G NR Sidelink Rx simulations
""")
parser.add_argument('--duration', '-d', metavar='SECONDS', type=int, default=30, help="""
How long to run the test before stopping to examine the logs
""")
parser.add_argument('--cmd', type=str, default='', help="""
Commands
""")
parser.add_argument('--nid1', type=int, default=10, help="""
Nid1 value
""")
parser.add_argument('--nid2', type=int, default=1, help="""
Nid2 value
""")
parser.add_argument('--log-dir', default=HOME_DIR, help="""
Where to store log files
""")
parser.add_argument('--compress', '-c', action='store_true', help="""
Compress the log files in the --log-dir
""")
parser.add_argument('--no-run', '-n', action='store_true', help="""
Don't run the test, only examine the logs in the --log-dir
directory from a previous run of the test
""")
parser.add_argument('--debug', action='store_true', help="""
Enable debug logging (for this script only)
""")
OPTS = parser.parse_args()
del parser
logging.basicConfig(level=logging.DEBUG if OPTS.debug else logging.INFO,
format='>>> %(name)s: %(levelname)s: %(message)s')
LOGGER = logging.getLogger(os.path.basename(sys.argv[0]))
log_file_path = os.path.join(OPTS.log_dir, 'rx.log')
# ----------------------------------------------------------------------------
def compress(from_name: str, to_name: Optional[str]=None, remove_original: bool=False) -> None:
"""
Compress the file `from_name` and store it as `to_name`.
`to_name` defaults to `from_name` with `.bz2` appended.
If `remove_original` is True, removes `from_name` when the compress finishes.
"""
if to_name is None:
to_name = from_name
if not to_name.endswith('.bz2'):
to_name += '.bz2'
LOGGER.info('Compress %s to %s', from_name, to_name)
with bz2.open(to_name, 'w') as outh, \
open(from_name, 'rb') as inh:
while True:
data = inh.read(10240)
if not data:
break
outh.write(data)
if remove_original:
LOGGER.debug('Remove %s', from_name)
os.remove(from_name)
class CompressJobs:
"""
Allow multiple invocations of `compress` to run in parallel
"""
def __init__(self) -> None:
self.kids: List[int] = []
def compress(self, from_name: str, to_name: Optional[str]=None, remove_original: bool=False) -> None:
if not os.path.exists(from_name):
# It's not necessarily an error if the log file does not exist.
# For example, if nfapi_trace never gets invoked (e.g., because
# NFAPI_TRACE_LEVEL is set to none), then the log file nfapi.log
# will not get created.
LOGGER.warning('No file: %s', from_name)
return
kid = os.fork()
if kid != 0:
self.kids.append(kid)
else:
LOGGER.debug('in pid %d compress %s...', os.getpid(), from_name)
compress(from_name, to_name, remove_original)
LOGGER.debug('in pid %d compress %s...done', os.getpid(), from_name)
sys.exit()
def wait(self) -> None:
LOGGER.debug('wait %s...', self.kids)
failed = []
for kid in self.kids:
LOGGER.debug('waitpid %d', kid)
_pid, status = os.waitpid(kid, 0)
if status != 0:
failed.append(kid)
if failed:
raise Exception('compression failed: %s', failed)
LOGGER.debug('wait...done')
class TestNearby():
"""
Represents TestNearby
"""
def __init__(self):
self.cmd = None
self.delay = 0 # seconds
def run(self, cmd: str) -> bool:
self.cmd = cmd
job = "nearby"
time.sleep(self.delay)
proc = self.launch_nearby(job)
LOGGER.info(f"nearby_proc = {proc}")
LOGGER.info(f"Process running... {job}")
time.sleep(OPTS.duration)
passed = self.kill_process("nearby", proc)
if OPTS.compress:
self.compress_log_file(proc)
return passed
def launch_nearby(self, job) -> Popen:
LOGGER.info('Launching Nearby UE: %s', log_file_path)
cmd = self.cmd
proc = Popen(cmd, shell=True)
time.sleep(1)
return proc
def kill_process(self, job: str, proc: Popen) -> bool:
passed = True
if proc:
status = proc.poll()
if status is None:
LOGGER.info('process is still running, which is good')
else:
#passed = False
LOGGER.info('process ended early: %r', status)
LOGGER.info(f'kill main simulation processes... {job}')
cmd = ['sudo', 'killall']
cmd.append('-KILL')
if proc:
cmd.append('nr-uesoftmodem')
if "nearby" == job:
subprocess.run(cmd)
LOGGER.info(f'Waiting for PID proc.pid for {job}')
proc.kill()
proc.wait()
LOGGER.info(f'kill main simulation processes...done for {job}')
return passed
def compress_log_file(self, proc: Popen):
jobs = CompressJobs()
jobs.compress(log_file_path)
jobs.wait()
# ----------------------------------------------------------------------------
def main(argv) -> int:
test_agent = TestNearby()
log_agent = LogChecker(OPTS, LOGGER)
passed = True
if not OPTS.no_run:
passed = test_agent.run(OPTS.cmd)
# Examine the logs to determine if the test passed
if not log_agent.analyze_nearby_logs(exp_nid1=OPTS.nid1, exp_nid2=OPTS.nid2):
passed = False
if not passed:
LOGGER.critical('FAILED')
return 1
LOGGER.info('PASSED')
return 0
sys.exit(main(sys.argv))

View File

@@ -0,0 +1,74 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-f1-accelleran</htmlTabRef>
<htmlTabName>F1 DU Interop Accelleran CU</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
111111
000020
000021
020021
100021
100022
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<test_svr_id>0</test_svr_id>
<images_to_pull>oai-gnb oai-nr-ue</images_to_pull>
</testCase>
<testCase id="000020">
<class>DeployGenObject</class>
<desc>Deploy OAI-DU</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
<services>oai-du</services>
<nb_healthy>1</nb_healthy>
</testCase>
<testCase id="000021">
<class>DeployGenObject</class>
<desc>Deploy nrUE</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
<services>oai-nr-ue</services>
<nb_healthy>2</nb_healthy>
</testCase>
<testCase id="020021">
<class>PingFromContainer</class>
<desc>Test Connectivity (ping)</desc>
<container_name>rfsim5g-oai-nr-ue</container_name>
<options>-I oaitun_ue1 -c 20 12.1.1.1</options>
<loss_threshold>0</loss_threshold>
</testCase>
<testCase id="100022">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,45 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-down-f1-accelleran</htmlTabRef>
<htmlTabName>CleanUp</htmlTabName>
<htmlTabIcon>trash</htmlTabIcon>
<TestCaseRequestedList>
100022
222222
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="100022">
<class>UndeployGenObject</class>
<desc>Undeploy all OAI 5G stack</desc>
<yaml_path>yaml_files/5g_rfsimulator_accelleran</yaml_path>
</testCase>
<testCase id="222222">
<class>Clean_Test_Server_Images</class>
<desc>Clean Test Images on Test Server</desc>
<test_svr_id>0</test_svr_id>
</testCase>
</testCaseList>

View File

@@ -69,8 +69,8 @@
<class>Custom_Command</class>
<desc>Reset USRP</desc>
<node>nepes</node>
<command>sudo -S b2xx_fx3_utils --reset-device</command>
</testCase>
<command>sudo -S /usr/lib/uhd/utils/b2xx_fx3_utils --reset-device</command>
</testCase>
<testCase id="200000">
<class>Custom_Command</class>

View File

@@ -0,0 +1,38 @@
version: '3.8'
services:
oai-du:
image: oaisoftwarealliance/oai-gnb:develop
privileged: true
container_name: rfsim5g-oai-du
network_mode: "host"
environment:
RFSIMULATOR: server
USE_VOLUMED_CONF: 'yes'
USE_ADDITIONAL_OPTIONS: --sa --rfsim --MACRLCs.[0].local_n_address 172.21.16.109 --MACRLCs.[0].remote_n_address 172.21.6.22 --log_config.global_log_options level,nocolor,time
volumes:
- ../../conf_files/gnb-du.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/mounted.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: oaisoftwarealliance/oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue
network_mode: "host"
environment:
RFSIMULATOR: 127.0.0.1
FULL_IMSI: '208990100001140'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-du
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5

View File

@@ -147,6 +147,18 @@
<nruns>3</nruns>
</testCase>
<testCase id="nr_psbchsim.106rb">
<desc>nr_psbchsim Test cases. (Test1: PSBCH and synchronization, 106PBR),
(Test2: PSBCH and synchronization, 106PBR, SSB SC OFFSET 6)</desc>
<main_exec>nr_psbchsim</main_exec>
<main_exec_args>-s-11 -S2 -n1 -I -R106
-s-11 -S2 -n1 -I -R106 -O6</main_exec_args>
<tags>test1 test2 test3</tags>
<search_expr_true>PSBCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>
</testCase>
<testCase id="nr_dlsim.basic">
<desc>nr_dlsim Test cases. (Test1: 106 PRB),
(Test2: 217 PRB),

View File

@@ -508,7 +508,7 @@ function main() {
[[ "$UE" == 1 ]] && execlist="$execlist lte-uesoftmodem"
[[ "$nrUE" == 1 ]] && execlist="$execlist nr-uesoftmodem"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
[[ "$SIMUS_PHY" == "1" ]] && execlist="$execlist dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
[[ "$SIMUS_PHY" == "1" ]] && execlist="$execlist dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_psbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
[[ "$BUILD_OPTLIB" != "" ]] && execlist="$execlist $BUILD_OPTLIB"
[[ "$execlist" != "" ]] && execlist="$execlist params_libconfig coding rfsimulator"

View File

@@ -33,6 +33,7 @@ OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "
case "$OS_DISTRO" in
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
rocky) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
centos) OS_BASEDISTRO="centos"; INSTALLER="yum"; CMAKE="cmake3" ;;
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
@@ -126,6 +127,12 @@ check_supported_distribution() {
"rhel9.3") return 0 ;;
"centos7") return 0 ;;
"centos8") return 0 ;;
"rocky8.7") return 0 ;;
"rocky8.8") return 0 ;;
"rocky8.9") return 0 ;;
"rocky9.1") return 0 ;;
"rocky9.2") return 0 ;;
"rocky9.3") return 0 ;;
esac
return 1
}
@@ -300,7 +307,7 @@ install_usrp_uhd_driver_from_source(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py
fi
if [[ "$OS_DISTRO" == "rhel" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
$SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py
fi
fi
@@ -367,7 +374,7 @@ check_install_usrp_uhd_driver(){
$SUDO $INSTALLER -y install $boost_libs_fedora $CMAKE
$SUDO pip3 install mako requests
fi
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [ $IS_CONTAINER -eq 0 ]
then
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
@@ -389,13 +396,13 @@ install_usrp_uhd_driver() {
# quick workaround for RHE7.6
local distribution=$(get_distribution_release)
if [ -z $1 ]; then
if [[ "$OS_DISTRO" == "rhel" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
$SUDO /usr/local/bin/uhd_images_downloader
else
$SUDO uhd_images_downloader
fi
else
if [[ "$OS_DISTRO" == "rhel" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
$SUDO /usr/local/bin/uhd_images_downloader -i $1
else
$SUDO uhd_images_downloader -i $1
@@ -562,7 +569,7 @@ check_install_additional_tools (){
libforms-bin \
libforms-dev \
xmlstarlet"
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
PACKAGE_LIST="\
doxygen \
ctags \
@@ -623,7 +630,7 @@ check_install_oai_software() {
xxd
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if rpm -q epel-release > /dev/null; then
echo "EPEL repos already present. Good."
else

View File

@@ -45,6 +45,7 @@
#include "common/config/config_userapi.h"
#include <time.h>
#include <sys/time.h>
#include "common/utils/LOG/log_extern.h"
// main log variables
@@ -66,32 +67,30 @@ char __log_mem_filename[1024]={0};
char * log_mem_filename = &__log_mem_filename[0];
char logmem_filename[1024] = {0};
mapping log_level_names[] = {
{"error", OAILOG_ERR},
{"warn", OAILOG_WARNING},
{"analysis", OAILOG_ANALYSIS},
{"info", OAILOG_INFO},
{"debug", OAILOG_DEBUG},
{"trace", OAILOG_TRACE},
{NULL, -1}
};
const mapping log_level_names[] = {{"error", OAILOG_ERR},
{"warn", OAILOG_WARNING},
{"analysis", OAILOG_ANALYSIS},
{"info", OAILOG_INFO},
{"debug", OAILOG_DEBUG},
{"trace", OAILOG_TRACE},
{NULL, -1}};
mapping log_options[] = {
{"nocolor", FLAG_NOCOLOR },
{"level", FLAG_LEVEL },
{"thread", FLAG_THREAD },
{"line_num", FLAG_FILE_LINE },
{"function", FLAG_FUNCT},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{NULL,-1}
};
const mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
{"level", FLAG_LEVEL},
{"thread", FLAG_THREAD},
{"line_num", FLAG_FILE_LINE},
{"function", FLAG_FUNCT},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{NULL, -1}};
mapping log_maskmap[] = LOG_MASKMAP_INIT;
char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
static const char *log_level_highlight_start[] =
{LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
static const char *log_level_highlight_end[] =
{LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
@@ -754,8 +753,7 @@ void close_component_filelog(int comp)
* with string value NULL
*/
/* map a string to an int. Takes a mapping array and a string as arg */
int map_str_to_int(mapping *map,
const char *str)
int map_str_to_int(const mapping *map, const char *str)
{
while (1) {
if (map->name == NULL) {
@@ -771,8 +769,7 @@ int map_str_to_int(mapping *map,
}
/* map an int to a string. Takes a mapping array and a value */
char *map_int_to_str(mapping *map,
int val)
char *map_int_to_str(const mapping *map, const int val)
{
while (1) {
if (map->name == NULL) {

View File

@@ -315,8 +315,8 @@ void set_glog_filelog(int enable);
void set_component_filelog(int comp);
void close_component_filelog(int comp);
void set_component_consolelog(int comp);
int map_str_to_int(mapping *map, const char *str);
char *map_int_to_str(mapping *map, int val);
int map_str_to_int(const mapping *map, const char *str);
char *map_int_to_str(const mapping *map, const int val);
void logClean (void);
int is_newline( char *str, int size);

View File

@@ -23,9 +23,8 @@
extern log_t *g_log;
extern mapping log_level_names[];
extern mapping log_options[];
extern const mapping log_level_names[];
extern const mapping log_options[];
extern mapping log_maskmap[];
extern int log_mem_flag;
extern char * log_mem_filename;

View File

@@ -706,3 +706,27 @@ void SLIV2SL(int SLIV,int *S,int *L) {
}
}
int get_ssb_subcarrier_offset(uint32_t absoluteFrequencySSB, uint32_t absoluteFrequencyPointA)
{
uint32_t absolute_diff = (absoluteFrequencySSB - absoluteFrequencyPointA);
const int scaling_5khz = absoluteFrequencyPointA < 600000 ? 3 : 1;
return ((absolute_diff / scaling_5khz) % 24);
}
uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
uint32_t absoluteFrequencyPointA,
int ssbSubcarrierSpacing,
int frequency_range)
{
uint32_t absolute_diff = (absoluteFrequencySSB - absoluteFrequencyPointA);
const int scaling_5khz = absoluteFrequencyPointA < 600000 ? 3 : 1;
int sco = get_ssb_subcarrier_offset(absoluteFrequencySSB, absoluteFrequencyPointA);
const int scs_scaling = frequency_range == FR2 ? 1 << (ssbSubcarrierSpacing - 2) : 1 << ssbSubcarrierSpacing;
const int scaled_abs_diff = absolute_diff / scaling_5khz;
const int ssb_offset_point_a =
(scaled_abs_diff - sco) / 12
- 10 * scs_scaling; // absoluteFrequencySSB is the central frequency of SSB which is made by 20RBs in total
AssertFatal(ssb_offset_point_a % scs_scaling == 0, "PRB offset %d can create frequency offset\n", ssb_offset_point_a);
AssertFatal(sco % scs_scaling == 0, "ssb offset %d can create frequency offset\n", sco);
return ssb_offset_point_a;
}

View File

@@ -101,7 +101,11 @@ void get_samplerate_and_bw(int mu,
unsigned int *samples_per_frame,
double *tx_bw,
double *rx_bw);
uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
uint32_t absoluteFrequencyPointA,
int ssbSubcarrierSpacing,
int frequency_range);
int get_ssb_subcarrier_offset(uint32_t absoluteFrequencySSB, uint32_t absoluteFrequencyPointA);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))

View File

@@ -30,7 +30,7 @@ The main oai binaries, which are tested by the Continuous Integration process ar
- The 5G gNodeB: `nr-softmodem`
- The 5G CU-UP: `nr-cuup`
- The LTE PHY simulators: `dlsim` and `ulsim`
- The 5G PHY simulators: `nr_dlschsim`, `nr_dlsim`, `nr_pbchsim`, `nr_pucchsim`, `nr_ulschsim`, `nr_ulsim`, `polartest`, `smallblocktest`, `nr _ulsim`, `ldpctest`
- The 5G PHY simulators: `nr_dlschsim`, `nr_dlsim`, `nr_pbchsim`, `nr_psbchsim`, `nr_pucchsim`, `nr_ulschsim`, `nr_ulsim`, `polartest`, `smallblocktest`, `nr _ulsim`, `ldpctest`
Running the [build_oai](../cmake_targets/build_oai) script also generates some utilities required to build and/or run the oai softmodem binaries:

View File

@@ -11,6 +11,7 @@
</td>
</tr>
</table>
# 1. Introduction
We use OpenAirInterface source code, and it's regular deployment scheme.
@@ -208,3 +209,46 @@ DU rlc north output goes to du_pdcp_data_ind() that push a outgoing packet reque
CU pdcp south output calls cu_rlc_data_ind() that do the same symetric processing.
# High-level F1-C code structure
The F1 interface is used internally between CU (mostly RRC) and DU (mostly MAC)
to exchange information. In DL, the CU sends messages as defined by the
callbacks in `mac_rrc_dl.h`, whose implementation is defined in files
`mac_rrc_dl_direct.c` (monolithic) and `mac_rrc_dl_f1ap.c` (for F1AP). In the
monolithic case, the RRC calls directly into the message handler on the DU side
(`mac_rrc_dl_handler.c`). In the F1 case, an ITTI message is sent to the CU
task, sending an ASN.1-encoded F1AP message. The DU side's DU task decodes the
message, and then calls the corresponding handler in `mac_rrc_dl_handler.c`.
Thus, the message flow is the same in both F1 and monolithic cases, with the
difference that F1AP encodes the messages using ASN.1 and sends over a socket.
In UL, the callbacks defined in `mac_rrc_ul.h` are implemented by
`mac_rrc_ul_direct.c` (monolithic) and `mac_rrc_ul_f1ap.c` (F1). In the direct
case, an ITTI message is directly sent to the RRC task (hence, there is no
dedicated handler). In F1, the DU task receives the ITTI message, encodes using
ASN.1, and sends it over a network socket. The CU task decodes, and sends the
same ITTI message to the RRC task as done directly in the monolithic case.
```
+-------------+
| |
| CU/RRC |
| |
+-------------+
| ^
Callback def: mac_rrc_dl.h | | No handler needed:
F1 impl: mac_rrc_dl_f1ap.c | | RRC has ITTI
Monolithic: mac_rrc_dl_direct.c | |
| |
DL | | UL
| |
| | Callback def: mac_rrc_ul.h
Message handler: | | F1 impl: mac_rrc_ul_f1ap.c
mac_rrc_dl_handler.c | | Monolithic: mac_rrc_ul_direct.c
v |
+-------------+
| |
| DU/MAC |
| |
+-------------+
```

View File

@@ -94,6 +94,7 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
## Special-purpose libraries
- OAI has two scopes, one based on Xforms, one on Qt5, described in [this README](../openair1/PHY/TOOLS/readme.md)
- OAI comes with an integrated [telnet server](../common/utils/telnetsrv/DOC/telnethelp.md) to monitor and control
- OAI comes with an integrated [web server](../common/utils/websrv/DOC/websrv.md)

View File

@@ -64,7 +64,7 @@ In our case the output is 0 and hence we use `numactl --cpunodebind=0 --membind=
## FR1 test
Open a terminal on the host machine, and execute below command to launch gNB with **X310 USRPs**
```sudo numactl --cpunodebind=0 --membind=0 ./nr-softmodem -E -O../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band78.fr1.106PRB.prs.usrpx310.conf --phy-test```
```sudo numactl --cpunodebind=0 --membind=0 ./nr-softmodem -E -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band78.fr1.106PRB.prs.usrpx310.conf --phy-test```
If **N310 USRPs** are used, then run above command `without -E option` i.e without 3/4 sampling rate.<br><br>
@@ -187,4 +187,4 @@ This script will read the IQ data from extracted PRS dumps(chF_gnbX_Y.raw and ch
<figcaption align = "center"><b>Fig.1 - FR2 100MHz test</b></figcaption>
</td>
</tr>
</table>
</table>

View File

@@ -55,7 +55,7 @@ Note: The available resources, and their current usage, is indicated here:
### 5G AW2S Testbench
**Purpose**: AW2S tests with Amarisoft
**Purpose**: AW2S tests with Amarisoft UE simulator
![5G AW2S Testbench](testbenches_doc_resources/5g-aw2s-bench.png)
@@ -82,7 +82,10 @@ Webhook
- [RAN-gNB-N300-Timing-Phytest-LDPC](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-gNB-N300-Timing-Phytest-LDPC/)
- caracal + N310
- pure performance test through phy-test scheduler, see command line for more details
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/)
- [RAN-Interop-F1](https://jenkins-oai.eurecom.fr/job/RAN-Interop-F1/)
- ofqot (DU, 1x UE)
- F1 interoperability testing: sets up connection to Accelleran CU, UE connection and connectivity test
- [RAN-L2-Sim-Test-4G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/)
- obelix (eNB, 1x UE, OAI EPC)
- L2simulator: skips physical layer and uses proxy between eNB and UE
- [RAN-L2-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-5G/)
@@ -92,7 +95,7 @@ Webhook
- hutch + B210, nano w/ ltebox + 2x UE
- tests RRC inactivity timers, different bandwidths
- [RAN-LTE-TDD-2x2-Container](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-LTE-TDD-2x2-Container/)
- obelix + N310, porcepix, quectel
- obelix + N310, porcepix, nrmodule2 + Quectel
- TM1 and TM2 test
- [RAN-LTE-TDD-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-LTE-TDD-LTEBOX-Container/)
- starsky + B210, nano w/ ltebox + 2x UE
@@ -111,14 +114,15 @@ Webhook
- uses RFsimulator, TDD 40MHz, FDD 40MHz, F1 split
- [RAN-RHEL8-Cluster-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/)
- cluster (`Asterix-OC-oaicicd-session` resource): RHEL 8 image build using the OpenShift Cluster
- [RAN-SA-AW2S-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AW2S-CN5G/)
- 5G-NR SA test setup: avra(RHEL9.1) + AW2S, amariue, OAI CN5G
- uses OpenShift cluster for CN deployment and container images for gNB deployment
- multi UE testing
- [RAN-SA-B200-Module-SABOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-SA-B200-Module-SABOX-Container/)
- ofqot + B200, idefix + Quectel, nepes w/ sabox
- basic SA test (20 MHz TDD), F1, reestablishment, ...
- [RAN-Ubuntu20-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
- obelix: Ubuntu 20 image build using docker (Note: builds U20 images while pipeline is named U18!)
- [RAN-SA-AW2S-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AW2S-CN5G/)
- 5G-NR SA test setup: Avra(RHEL9.1)/Manarola(U22PRO) + AW2S, Amarisoft UE x1, OAI CN5G
- uses OpenShift cluster for CN deployment and container images for gNB deployment
### RAN-CI-NSA-Trigger

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -23,9 +23,11 @@
\node[below right=-0.7cm and 0.35cm of b78o.east] (anto2)
{\includegraphics[width=0.3cm]{antenna}} edge (b78o);
\node[right=4cm of aw2s, label=above:Amarisoft UE] (amariue)
\node[right=3.5cm of aw2s, label=above:amariue] (amariue)
{\includegraphics[width=0.7cm]{amariue}};
\node[right=3cm of aw2s] (anto3)
\node[right=0.8cm of anto1] (anto3)
{\includegraphics[width=0.3cm]{antenna}} edge (amariue);
\node[right=0.8cm of anto2] (anto4)
{\includegraphics[width=0.3cm]{antenna}} edge (amariue);
\end{tikzpicture}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

@@ -0,0 +1,58 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM $BASE_IMAGE AS ran-base
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=4.4.0.0
RUN dnf install 'dnf-command(config-manager)' -y && \
dnf config-manager --set-enabled powertools && \
dnf install epel-release -y && crb enable && \
dnf update -y && \
dnf install -y \
#gcc needed for build_oai
gcc gcc-c++ \
diffutils \
file \
psmisc \
git \
# python3-pip and pyyaml are used for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml
#create the WORKDIR
WORKDIR /oai-ran
COPY . .
#run build_oai -I to get the builder image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I --install-optional-packages -w USRP

View File

@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function

View File

@@ -0,0 +1,38 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
FROM ran-base:latest as ran-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c

View File

@@ -35,4 +35,4 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function

View File

@@ -40,4 +40,4 @@ RUN /bin/sh oaienv && \
mkdir -p log && \
export CC=/usr/bin/clang && \
export CXX=/usr/bin/clang++ && \
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function

130
docker/Dockerfile.eNB.rocky Normal file
View File

@@ -0,0 +1,130 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS enb-base
FROM ran-build:latest AS enb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-enb
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
tzdata \
procps-ng \
atlas \
gdb \
python3 \
python3-pip \
net-tools \
iputils \
iproute && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-enb/bin
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/lte-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_enb.so \
/usr/local/lib/
COPY --from=enb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=enb-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on lte-softmodem" && ldd /opt/oai-enb/bin/lte-softmodem && \
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif.so" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on liboai_iqplayer.so" && ldd /usr/local/lib/liboai_iqplayer.so && \
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_enb.so" && ldd /usr/local/lib/libtelnetsrv_enb.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-enb/etc
COPY --from=enb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-enb
# 2152 --> S1U, GTP/UDP
# 36412 --> S1C, SCTP/UDP
# 36422 --> X2C, SCTP/UDP
EXPOSE 2152/udp 36412/udp 36422/udp
ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]

View File

@@ -0,0 +1,105 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
COPY ./libori.so /usr/local/lib
# build AW2S fronthaul lib
WORKDIR /oai-ran
RUN /bin/sh oaienv && \
cd cmake_targets/ran_build/build && \
ninja aw2sori_transpro
#start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb-aw2s
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
libXpm \
libX11 \
atlas \
lksctp-tools \
tzdata \
net-tools \
iputils && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-gnb-aw2s/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
./
COPY ./docker/scripts/gnb-aw2s_entrypoint.sh ./entrypoint.sh
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libaw2sori_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/libori.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_transpro.so && \
ln -s /usr/local/lib/liboai_eth_transpro.so /usr/local/lib/liboai_transpro.so && \
ldconfig && \
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb-aw2s/bin/nr-softmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on libaw2sori_transpro" && ldd /usr/local/lib/libaw2sori_transpro.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb-aw2s
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]

138
docker/Dockerfile.gNB.rocky Normal file
View File

@@ -0,0 +1,138 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
libXpm \
libX11 \
atlas \
lksctp-tools \
tzdata \
gdb \
python3 \
python3-pip \
net-tools \
iputils && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb/bin/nr-softmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_ci" && ldd /usr/local/lib/libtelnetsrv_ci.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]

View File

@@ -0,0 +1,123 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS lte-ue-base
FROM ran-build:latest AS lte-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-lte-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
procps-ng \
tzdata \
atlas \
gdb \
python3 \
python3-pip \
iproute \
net-tools \
iputils && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-lte-ue/bin
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
/oai-ran/docker/scripts/entrypoint.sh \
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
./
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=lte-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on lte-uesoftmodem" && ldd /opt/oai-lte-ue/bin/lte-uesoftmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
# Copy the relevant configuration files for UE
WORKDIR /opt/oai-lte-ue/etc
COPY --from=lte-ue-build /oai-ran/docker/etc .
WORKDIR /opt/oai-lte-ue
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]

View File

@@ -0,0 +1,80 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-nr-cuup
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
lksctp-tools \
tzdata \
atlas \
net-tools \
iputils && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-cuup \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
RUN ldconfig && \
echo "ldd on nr-cuup" && ldd /opt/oai-gnb/bin/nr-cuup && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]

View File

@@ -0,0 +1,138 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS nr-ue-base
FROM ran-build:latest AS nr-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/nr_ue_parameters.yaml && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-nr-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
procps-ng \
tzdata \
net-tools \
iputils \
iproute \
atlas \
gdb \
python3 \
python3-pip \
libXpm \
libX11 && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build \
/oai-ran/ci-scripts/conf_files/nr-ue-sim.conf \
/oai-ran/docker/etc/nr-ue.nfapi.conf \
./
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/usr/local/lib/
COPY --from=nr-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libforms.so.2 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on nr-uesoftmodem" && ldd /opt/oai-nr-ue/bin/nr-uesoftmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_5Gue" && ldd /usr/local/lib/libtelnetsrv_5Gue.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]

View File

@@ -38,7 +38,7 @@ RUN yum install -y libasan libubsan
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --phy_simulators --ninja --verbose-ci --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
./build_oai --phy_simulators --ninja --verbose-ci --sanitize --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_C_FLAGS=-Wno-unused-function --cmake-opt -DCMAKE_CXX_FLAGS=-Wno-unused-function
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-physim

View File

@@ -77,6 +77,7 @@ The currently-supported OS are:
- `rhel8.2` for Red Hat Entreprise Linux (including images for an OpenShift cluster)
- `ubuntu20` for Ubuntu 20.04 LTS
- `rocky` for Rocky-Linux 8.7
For more details regarding the build on an Openshift Cluster, see [OpenShift README](../openshift/README.md).
@@ -111,6 +112,8 @@ ran-base latest 5c9c02a5b4a8 1 minute ago
...
```
Note that the steps are identical for `rocky-linux`.
## 3.3. Building any target image ##
For example, the eNB:
@@ -136,6 +139,8 @@ Do not forget to remove the temporary image:
docker image prune --force
```
Note that the steps are identical for `rocky-linux`.
# 4. Building using `podman` under Red Hat Entreprise Linux 8.2 #
Analogous to the above steps:

View File

@@ -111,7 +111,7 @@ f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP)
return NULL;
}
void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP)
void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, uint8_t xid)
{
abort();
}

View File

@@ -195,7 +195,8 @@ void rx_func(void *param)
gNB->common_vars.rxdataF[aa],
slot_rx,
0,
gNB->frame_parms.Ncp==EXTENDED?12:14);
gNB->frame_parms.Ncp==EXTENDED?12:14,
NR_LINK_TYPE_UL);
}
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
}

View File

@@ -33,6 +33,13 @@
#include "executables/softmodem-common.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "radio/COMMON/common_lib.h"
#include "LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/NR_REFSIG/sss_nr.h"
#include "common/utils/nr/nr_common.h"
//#define DEBUG_PHY_SL_PROC
#include "pdcp.h"
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
/*
@@ -99,7 +106,8 @@
typedef enum {
pss = 0,
pbch = 1,
si = 2
si = 2,
psbch = 3,
} sync_mode_t;
static void *NRUE_phy_stub_standalone_pnf_task(void *arg);
@@ -160,12 +168,13 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
// initialize all signal buffers
init_nr_ue_signal(ue, nb_connected_gNB);
if (get_softmodem_params()->sl_mode != 2) {
// intialize transport
init_nr_ue_transport(ue);
// intialize transport
init_nr_ue_transport(ue);
// init N_TA offset
init_N_TA_offset(ue);
// init N_TA offset
init_N_TA_offset(ue);
}
}
void init_nrUE_standalone_thread(int ue_idx)
@@ -376,7 +385,12 @@ static void UE_synch(void *arg) {
sync_mode_t sync_mode = pbch;
//int CC_id = UE->CC_id;
static int freq_offset=0;
UE->is_synchronized = 0;
if (get_softmodem_params()->sl_mode == 2) {
UE->is_synchronized_sl = 0;
sync_mode = psbch;
} else {
UE->is_synchronized = 0;
}
if (UE->UE_scan == 0) {
@@ -392,7 +406,6 @@ static void UE_synch(void *arg) {
}
sync_mode = pbch;
} else {
LOG_E(PHY,"Fixme!\n");
/*
@@ -492,9 +505,44 @@ static void UE_synch(void *arg) {
break;
case si:
case psbch: {
int initial_synch_sl = nr_sl_initial_sync(&syncD->proc, UE, 2);
if (initial_synch_sl >= 0) { // gNB will work as SyncRef UE in simulation.
// rerun with new cell parameters and frequency-offset
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
nr_sl_rf_card_config_freq(UE, &openair0_cfg[UE->rf_map.card], freq_offset);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0]);
if (UE->UE_scan_carrier == 1) {
UE->UE_scan_carrier = 0;
} else {
if (initial_synch_sl == 0) {
UE->is_synchronized_sl = 1;
LOG_I(NR_PHY, "SyncRef UE found with Nid1 %d and Nid2 %d SSS-RSRP %d dBm/RE\n",
GET_NID1_SL(UE->frame_parms.Nid_SL), GET_NID2_SL(UE->frame_parms.Nid_SL),
UE->measurements.ssb_rsrp_dBm[0]);
exit(1);
}
}
} else {
LOG_I(NR_PHY, "No SyncRef UE found\n");
if (UE->UE_scan_carrier == 1) {
LOG_I(PHY, "Initial sync failed: trying carrier off %d Hz\n", freq_offset);
if (freq_offset >= 0)
freq_offset += 100;
freq_offset *= -1;
nr_sl_rf_card_config_freq(UE, &openair0_cfg[UE->rf_map.card], freq_offset);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice, &openair0_cfg[0]);
}
}
break;
}
default:
break;
}
}
@@ -561,6 +609,8 @@ void processSlotTX(void *arg) {
nr_phy_data_tx_t phy_data = {0};
LOG_D(PHY,"%d.%d => slot type %d\n", proc->frame_tx, proc->nr_slot_tx, proc->tx_slot_type);
if (UE->sync_ref && get_softmodem_params()->sl_mode != 0)
proc->tx_slot_type = NR_UPLINK_SLOT;
if (proc->tx_slot_type == NR_UPLINK_SLOT || proc->tx_slot_type == NR_MIXED_SLOT){
// wait for rx slots to send indication (if any) that DLSCH decoding is finished
@@ -571,7 +621,7 @@ void processSlotTX(void *arg) {
// trigger L2 to run ue_scheduler thru IF module
// [TODO] mapping right after NR initial sync
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
if (get_softmodem_params()->sl_mode != 2 && UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
start_meas(&UE->ue_ul_indication_stats);
nr_uplink_indication_t ul_indication;
memset((void*)&ul_indication, 0, sizeof(ul_indication));
@@ -589,10 +639,20 @@ void processSlotTX(void *arg) {
stop_meas(&UE->ue_ul_indication_stats);
}
phy_procedures_nrUE_TX(UE, proc, &phy_data);
if (get_softmodem_params()->sl_mode == 0) {
phy_procedures_nrUE_TX(UE, proc, &phy_data);
} else {
phy_procedures_nrUE_SL_TX(UE, proc, 0);
}
}
if (get_softmodem_params()->sl_mode == 0) {
RU_write(rxtxD);
}
}
RU_write(rxtxD);
void processSlotRX_SL(void *arg) {
nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
processSlotTX(rxtxD);
}
nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
@@ -703,11 +763,11 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
LOG_I(PHY,"Resynchronizing RX by %d samples\n",UE->rx_offset);
int rx_offset = (get_softmodem_params()->sl_mode != 0) ? UE->rx_offset_sl : UE->rx_offset;
if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) {
// Resynchonize by slot (will work with numerology 1 only)
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe/2 ) {
for (int size = rx_offset; size > 0; size -= UE->frame_parms.samples_per_subframe / 2) {
int unitTransfer=size>UE->frame_parms.samples_per_subframe/2 ? UE->frame_parms.samples_per_subframe/2 : size ;
AssertFatal(unitTransfer ==
UE->rfdevice.trx_read_func(&UE->rfdevice,
@@ -718,11 +778,11 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
}
} else {
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
for (int size = rx_offset; size > 0; size -= UE->frame_parms.samples_per_subframe) {
int unitTransfer=size>UE->frame_parms.samples_per_subframe ? UE->frame_parms.samples_per_subframe : size ;
// we write before read because gNB waits for UE to write and both executions halt
// this happens here as the read size is samples_per_subframe which is very much larger than samp_per_slot
if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer);
if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer);
AssertFatal(unitTransfer ==
UE->rfdevice.trx_read_func(&UE->rfdevice,
timestamp,
@@ -738,28 +798,305 @@ int computeSamplesShift(PHY_VARS_NR_UE *UE) {
int samples_shift = -(UE->rx_offset>>1);
if (samples_shift != 0) {
LOG_I(NR_PHY,"Adjusting frame in time by %i samples\n", samples_shift);
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
if (get_softmodem_params()->sl_mode == 0) {
UE->rx_offset = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
} else {
UE->rx_offset_sl = 0; // reset so that it is not applied falsely in case of SSB being only in every second frame
}
UE->max_pos_fil += samples_shift << 15; // reset IIR filter when sample shift is applied
}
return samples_shift;
}
static inline int get_firstSymSamp(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
static inline int get_firstSymSamp(uint16_t slot, NR_DL_FRAME_PARMS *fp, bool sync) {
uint16_t nb_prefix_samples0 = fp->nb_prefix_samples0;
if (get_softmodem_params()->sl_mode != 0) {
nb_prefix_samples0 = sync ? fp->nb_prefix_samples0 : fp->nb_prefix_samples;
}
if (fp->numerology_index == 0)
return fp->nb_prefix_samples0 + fp->ofdm_symbol_size;
int num_samples = (slot%(fp->slots_per_subframe/2)) ? fp->nb_prefix_samples : fp->nb_prefix_samples0;
int num_samples = (slot % (fp->slots_per_subframe / 2)) ? fp->nb_prefix_samples : nb_prefix_samples0;
num_samples += fp->ofdm_symbol_size;
return num_samples;
}
static inline int get_readBlockSize(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
int rem_samples = fp->get_samples_per_slot(slot, fp) - get_firstSymSamp(slot, fp);
static inline int get_readBlockSize(uint16_t slot, NR_DL_FRAME_PARMS *fp, bool sync) {
int rem_samples = fp->get_samples_per_slot(slot, fp) - get_firstSymSamp(slot, fp, sync);
int next_slot_first_symbol = 0;
if (slot < (fp->slots_per_frame-1))
next_slot_first_symbol = get_firstSymSamp(slot+1, fp);
next_slot_first_symbol = get_firstSymSamp(slot+1, fp, sync);
return rem_samples + next_slot_first_symbol;
}
int slot_to_flag_sl(uint8_t tdd_period, int slot, uint16_t slot_config, uint16_t num_slot_frame) {
int flag, isUL, isULnext, isULbefore;
int num_period_slot = get_nb_periods_per_frame(tdd_period);
slot = slot % (num_slot_frame / num_period_slot);
isUL = (slot_config >> slot) & 0x1;// indicator to show if the slot is UL or DL
if (slot > 0) {
//checking if previous slot is UL
isULbefore = (slot_config >> (slot - 1)) & 0x1;
} else {
isULbefore = 0;
}
if (slot < (num_slot_frame / num_period_slot) - 1) {
// checking if next slot is UL
isULnext = (slot_config >> (slot+1)) & 0x1;
} else {
isULnext = 0;
}
if (isUL) {
if (slot == 0 || !isULbefore) {
flag = 2; // first slot should start transmission
} else if (slot == (num_slot_frame / num_period_slot) - 1 || !isULnext) {
flag = 3; // last slot that should stop transmission
} else {
flag = 1; // it is niether first nor last slot.
}
} else {
flag = 0; // don't transmit at all
}
LOG_D(NR_PHY, "### slot(%d), UL(%d), flag(%d)\n", slot, isUL, flag);
return flag;
}
void *UE_thread_SL(void *arg) {
PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg;
openair0_timestamp timestamp, writeTimestamp;
void *rxp[NB_ANTENNAS_RX], *txp[NB_ANTENNAS_TX];
AssertFatal(0 == openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]), "");
UE->rfdevice.host_type = RAU_HOST;
AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n");
notifiedFIFO_t nf;
initNotifiedFIFO(&nf);
notifiedFIFO_t freeBlocks;
initNotifiedFIFO_nothreadSafe(&freeBlocks);
int nbSlotProcessing = 0;
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
int timing_advance = UE->timing_advance;
UE->lost_sync_sl = 0;
UE->is_synchronized_sl = 0;
UE->sync_ref = get_softmodem_params()->sync_ref;
bool sync_running_sl = false;
const int nb_slot_frame = UE->frame_parms.slots_per_frame;
int absolute_slot = 0, decoded_frame_rx = INT_MAX, trashed_frames = 0, start_rx_stream = 0;
for (int i = 0; i < NR_RX_NB_TH + 1; i++) {// NR_RX_NB_TH working + 1 we are making to be pushed
notifiedFIFO_elt_t *newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), RX_JOB_ID, &nf, processSlotRX_SL);
nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(newElt);
initNotifiedFIFO(&curMsg->txFifo);
pushNotifiedFIFO_nothreadSafe(&freeBlocks, newElt);
}
while (!oai_exit) {
if (UE->lost_sync_sl && UE->sync_ref == 0) {
LOG_I(NR_PHY, "Sync UE: lost_sync status\n");
int nb = abortTpoolJob(&(get_nrUE_params()->Tpool),RX_JOB_ID);
nb += abortNotifiedFIFOJob(&nf, RX_JOB_ID);
LOG_I(PHY,"Number of aborted slots %d\n",nb);
for (int i=0; i<nb; i++)
pushNotifiedFIFO_nothreadSafe(&freeBlocks, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), RX_JOB_ID, &nf, processSlotRX_SL));
nbSlotProcessing = 0;
UE->is_synchronized_sl = 0;
UE->lost_sync_sl = 0;
}
if (sync_running_sl && UE->sync_ref == 0) {
LOG_I(NR_PHY, "Nearby UE: sync_running status.\n");
notifiedFIFO_elt_t *res=tryPullTpool(&nf,&(get_nrUE_params()->Tpool));
if (res) {
sync_running_sl = false;
LOG_I(NR_PHY, "Nearby UE: sync_running was set to false due to valid res.\n");
syncData_t *tmp=(syncData_t *)NotifiedFifoData(res);
LOG_I(NR_PHY, "Nearby UE: UE->is_synchronized_sl = %d\n", UE->is_synchronized_sl);
if (UE->is_synchronized_sl && get_softmodem_params()->sl_mode < 2) {
decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
decoded_frame_rx=(decoded_frame_rx + UE->init_sync_frame + trashed_frames) % MAX_FRAME_NUMBER;
}
delNotifiedFIFO_elt(res);
start_rx_stream = 0;
} else {
LOG_I(PHY, "Nearby UE: sync_running_sl still in readFrame due to INVALID res.\n");
readFrame(UE, &timestamp, true);
trashed_frames += 2;
continue;
}
}
AssertFatal(!sync_running_sl, "At this point synchronization can't be running\n");
if (UE->is_synchronized_sl == 0 && UE->sync_ref == 0) {
LOG_I(NR_PHY, "Sync UE: UE->is_synchronized_sl == 0 && UE->sync_ref == 0)\n");
readFrame(UE, &timestamp, false);
notifiedFIFO_elt_t *Msg=newNotifiedFIFO_elt(sizeof(syncData_t), 0, &nf, UE_synch);
syncData_t *syncMsg = (syncData_t *)NotifiedFifoData(Msg);
syncMsg->UE = UE;
memset(&syncMsg->proc, 0, sizeof(syncMsg->proc));
pushTpool(&(get_nrUE_params()->Tpool), Msg);
trashed_frames=0;
sync_running_sl =true;
continue;
}
if (start_rx_stream == 0 && UE->sync_ref == 0) {
start_rx_stream = 1;
syncInFrame(UE, &timestamp);
LOG_I(NR_PHY, "Sync UE: rx_stream = 1 and timestamp %ld\n", timestamp);
UE->rx_offset_sl = 0;
UE->time_sync_cell = 0;
uint16_t nb_prefix_samples0 = UE->is_synchronized_sl ? UE->frame_parms.nb_prefix_samples0 :
UE->frame_parms.nb_prefix_samples;
AssertFatal (UE->frame_parms.ofdm_symbol_size + nb_prefix_samples0 ==
UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp,
(void **)UE->common_vars.rxdata,
UE->frame_parms.ofdm_symbol_size + nb_prefix_samples0,
UE->frame_parms.nb_antennas_rx), "Could not read in first symbol");
// we have the decoded frame index in the return of the synch process
// and we shifted above to the first slot of next frame
decoded_frame_rx++;
// we do ++ first in the regular processing, so it will be begin of frame;
absolute_slot = decoded_frame_rx * nb_slot_frame - 1;
continue;
}
absolute_slot++;
// Fix me: will be wrong when slot 1 is slow, as slot 2 finishes
// Slot 3 will overlap if NR_RX_NB_TH is 2
// this is general failure in UE !!
int slot_nr = absolute_slot % nb_slot_frame;
notifiedFIFO_elt_t *msgToPush;
AssertFatal((msgToPush=pullNotifiedFIFO_nothreadSafe(&freeBlocks)) != NULL,"chained list failure");
nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
curMsg->UE = UE;
// update thread index for received subframe
curMsg->proc.CC_id = UE->CC_id;
curMsg->proc.nr_slot_rx = slot_nr;
curMsg->proc.nr_slot_tx = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
curMsg->proc.frame_rx = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
curMsg->proc.frame_tx = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
curMsg->proc.decoded_frame_rx=-1;
LOG_D(NR_PHY, "Process slot %d total gain %d\n", slot_nr, UE->rx_total_gain_dB);
int firstSymSamp = get_firstSymSamp(slot_nr, &UE->frame_parms, UE->is_synchronized_sl);
uint64_t write_time_stamp = UE->frame_parms.get_samples_slot_timestamp(slot_nr, &UE->frame_parms, 0);
uint64_t read_time_stamp = UE->frame_parms.get_samples_slot_timestamp(slot_nr, &UE->frame_parms, 0);
for (int i = 0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void *)&UE->common_vars.rxdata[i][read_time_stamp];
for (int i = 0; i < UE->frame_parms.nb_antennas_tx; i++)
txp[i] = (void *)&UE->common_vars.txdata[i][write_time_stamp];
int readBlockSize, writeBlockSize;
if (slot_nr < (nb_slot_frame - 1)) {
readBlockSize = get_readBlockSize(slot_nr, &UE->frame_parms, UE->is_synchronized_sl);
writeBlockSize = UE->frame_parms.get_samples_per_slot(slot_nr, &UE->frame_parms);
} else {
UE->rx_offset_diff = computeSamplesShift(UE);
readBlockSize = get_readBlockSize(slot_nr, &UE->frame_parms, UE->is_synchronized_sl) - UE->rx_offset_diff;
writeBlockSize = UE->frame_parms.get_samples_per_slot(slot_nr, &UE->frame_parms) - UE->rx_offset_diff;
}
AssertFatal(readBlockSize ==
UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp,
rxp,
readBlockSize,
UE->frame_parms.nb_antennas_rx), "");
if (slot_nr == (nb_slot_frame - 1)) {
// read in first symbol of next frame and adjust for timing drift
uint16_t nb_prefix_samples0 = UE->is_synchronized_sl ? UE->frame_parms.nb_prefix_samples0 :
UE->frame_parms.nb_prefix_samples;
int first_symbols = UE->frame_parms.ofdm_symbol_size + nb_prefix_samples0;
if (first_symbols > 0) {
openair0_timestamp ignore_timestamp;
AssertFatal(first_symbols ==
UE->rfdevice.trx_read_func(&UE->rfdevice,
&ignore_timestamp,
(void **)UE->common_vars.rxdata,
first_symbols,
UE->frame_parms.nb_antennas_rx),"");
} else {
LOG_E(NR_PHY, "Can't compensate: diff =%d\n", first_symbols);
}
}
curMsg->proc.timestamp_tx = timestamp +
UE->frame_parms.get_samples_slot_timestamp(slot_nr, &UE->frame_parms, DURATION_RX_TO_TX) -
firstSymSamp;
while (nbSlotProcessing >= NR_RX_NB_TH) {
notifiedFIFO_elt_t *res = pullTpool(&nf, &(get_nrUE_params()->Tpool));
if (res == NULL)
break; // Tpool has been stopped
nbSlotProcessing--;
nr_rxtx_thread_data_t *tmp = (nr_rxtx_thread_data_t *)res->msgData;
if (tmp->proc.decoded_frame_rx != -1)
decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >>
mac->mib->systemFrameNumber.bits_unused) << 4) |
tmp->proc.decoded_frame_rx);
else
decoded_frame_rx=-1;
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
}
if (UE->sync_ref == 0 && decoded_frame_rx > 0 && decoded_frame_rx != curMsg->proc.frame_rx)
LOG_E(NR_PHY, "Sync UE: Decoded frame index (%d) is not compatible with current context (%d), "
"UE should go back to synch mode\n", decoded_frame_rx, curMsg->proc.frame_rx);
// use previous timing_advance value to compute writeTimestamp
writeTimestamp = timestamp +
UE->frame_parms.get_samples_slot_timestamp(slot_nr, &UE->frame_parms, DURATION_RX_TO_TX - NR_RX_NB_TH) -
firstSymSamp - openair0_cfg[0].tx_sample_advance - UE->N_TA_offset - timing_advance;
// but use current UE->timing_advance value to compute writeBlockSize
if (UE->timing_advance != timing_advance) {
writeBlockSize -= UE->timing_advance - timing_advance;
timing_advance = UE->timing_advance;
}
int flags = 1;
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
flags = slot_to_flag_sl(fp->tdd_period, slot_nr, fp->tdd_slot_config, fp->slots_per_frame);
if (flags || IS_SOFTMODEM_RFSIM) {
LOG_D(NR_PHY, "current slot goring to write USRP: %d\n", slot_nr);
AssertFatal(writeBlockSize ==
UE->rfdevice.trx_write_func(&UE->rfdevice,
writeTimestamp,
txp,
writeBlockSize,
UE->frame_parms.nb_antennas_tx,
flags), "");
}
#ifdef DEBUG_PHY_SL_PROC
char buffer[UE->frame_parms.ofdm_symbol_size];
for (int i = 0; i < 13; i++) {
bzero(buffer, sizeof(buffer));
LOG_I(NR_PHY, "Transmitted SSB %d = %s\n",
i, hexdump(&txp[0][UE->frame_parms.ofdm_symbol_size*i],
UE->frame_parms.ofdm_symbol_size, buffer, sizeof(buffer)));
}
#endif
for (int i = 0; i < UE->frame_parms.nb_antennas_tx; i++) {
memset(txp[i], 0, writeBlockSize);
}
nbSlotProcessing++;
LOG_D(NR_PHY, "Number of slots being processed at the moment: %d\n", nbSlotProcessing);
pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
} // while !oai_exit
return NULL;
}
void *UE_thread(void *arg) {
//this thread should be over the processing thread to keep in real time
PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg;
@@ -897,7 +1234,7 @@ void *UE_thread(void *arg) {
}*/
#endif
int firstSymSamp = get_firstSymSamp(slot_nr, &UE->frame_parms);
int firstSymSamp = get_firstSymSamp(slot_nr, &UE->frame_parms, UE->is_synchronized);
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void *)&UE->common_vars.rxdata[i][firstSymSamp+
UE->frame_parms.get_samples_slot_timestamp(slot_nr,&UE->frame_parms,0)];
@@ -905,11 +1242,11 @@ void *UE_thread(void *arg) {
int readBlockSize, writeBlockSize;
if (slot_nr<(nb_slot_frame - 1)) {
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms);
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms, UE->is_synchronized);
writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, &UE->frame_parms);
} else {
UE->rx_offset_diff = computeSamplesShift(UE);
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms) -
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms, UE->is_synchronized) -
UE->rx_offset_diff;
writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, &UE->frame_parms)- UE->rx_offset_diff;
}
@@ -1004,18 +1341,27 @@ void init_NR_UE(int nb_inst,
}
void init_NR_UE_threads(int nb_inst) {
int inst;
pthread_t threads[nb_inst];
pthread_t threadsSL[nb_inst];
for (inst=0; inst < nb_inst; inst++) {
for (int inst = 0; inst < nb_inst; inst++) {
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0];
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
if (!IS_SOFTMODEM_NOSTATS_BIT) {
pthread_t stat_pthread;
threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
if (get_softmodem_params()->sl_mode == 0) {
LOG_I(NR_PHY, "Intializing UE Threads for instance %d (%p,%p)...\n", inst, PHY_vars_UE_g[inst], PHY_vars_UE_g[inst][0]);
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
if (!IS_SOFTMODEM_NOSTATS_BIT) {
pthread_t stat_pthread;
threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
}
}
else if (get_softmodem_params()->sl_mode == 2) {
LOG_I(NR_PHY, "Intializing Sidelink UE Threads for instance %d (%p,%p)...\n", inst, PHY_vars_UE_g[inst], PHY_vars_UE_g[inst][0]);
threadCreate(&threadsSL[inst], UE_thread_SL, (void *)UE, "UEthreadSL", -1, OAI_PRIORITY_RT_MAX);
}
else {
LOG_I(NR_PHY,"Need implementation...\n");
abort();
}
}
}

View File

@@ -86,6 +86,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "nr_nas_msg_sim.h"
#include <openair1/PHY/MODULATION/nr_modulation.h>
#include "openair2/GNB_APP/gnb_paramdef.h"
#include <openair1/PHY/NR_REFSIG/sss_nr.h>
extern const char *duplex_mode[];
THREAD_STRUCT thread_struct;
@@ -128,6 +129,7 @@ int dumpframe = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
uint64_t sidelink_frequency[MAX_NUM_CCs][4];
int rx_input_level_dBm;
#if MAX_NUM_CCs == 1
@@ -143,7 +145,6 @@ double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
// UE and OAI config variables
openair0_config_t openair0_cfg[MAX_CARDS];
int16_t node_synch_ref[MAX_NUM_CCs];
int otg_enabled;
double cpuf;
@@ -163,6 +164,7 @@ uint32_t N_RB_DL = 106;
uint8_t abstraction_flag=0;
nr_bler_struct nr_bler_data[NR_NUM_MCS];
nr_bler_struct nr_mimo_bler_data[NR_NUM_MCS];
static void init_bler_table(char*);
@@ -259,6 +261,81 @@ nrUE_params_t *get_nrUE_params(void) {
return &nrUE_params;
}
static void nr_phy_config_request_sl(PHY_VARS_NR_UE *ue,
int N_RB_DL,
int N_RB_UL,
int CC_id)
{
uint64_t rev_burst = 0;
uint64_t SSB_positions = 0x01;
int mu = 1;
uint8_t n_tx = 1;
uint8_t n_rx = 1;
uint16_t Nid_cell = 0;
int ssb_subcarrier_offset = 0;
for (int i = 0; i < 64; i++)
rev_burst |= (((SSB_positions >> (63-i))&0x01) << i);
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
fapi_nr_config_request_t *nrUE_config = &ue->nrUE_config;
nrUE_config->cell_config.phy_cell_id = get_softmodem_params()->nid1 + get_softmodem_params()->nid2 * NUMBER_SSS_SEQUENCE;
nrUE_config->ssb_config.scs_common = mu;
nrUE_config->ssb_table.ssb_subcarrier_offset = 0;
nrUE_config->ssb_table.ssb_offset_point_a = 0;
nrUE_config->ssb_table.ssb_mask_list[1].ssb_mask = (rev_burst)&(0xFFFFFFFF);
nrUE_config->ssb_table.ssb_mask_list[0].ssb_mask = (rev_burst>>32)&(0xFFFFFFFF);
nrUE_config->cell_config.frame_duplex_type = TDD;
nrUE_config->ssb_table.ssb_period = 1; //10ms
nrUE_config->carrier_config.dl_grid_size[mu] = N_RB_DL;
nrUE_config->carrier_config.ul_grid_size[mu] = N_RB_UL;
nrUE_config->carrier_config.num_tx_ant = fp->nb_antennas_tx;
nrUE_config->carrier_config.num_rx_ant = fp->nb_antennas_rx;
nrUE_config->tdd_table.tdd_period = 0;
nrUE_config->carrier_config.dl_frequency = downlink_frequency[CC_id][0] / 1000;
nrUE_config->carrier_config.uplink_frequency = downlink_frequency[CC_id][0] / 1000;
nrUE_config->carrier_config.sl_frequency = sidelink_frequency[CC_id][0] / 1000;
LOG_D(NR_PHY, "SL Frequency %u\n", nrUE_config->carrier_config.sl_frequency);
fp->tdd_period = 6; // 6 indicates 5ms (see get_nb_periods_per_frame())
fp->tdd_slot_config = 0b0000111111; // 1 -> UL, 0-> DL for each slot , LSB is the slot 0
fp->dl_CarrierFreq = 2600000000;
fp->ul_CarrierFreq = 2600000000;
fp->nb_antennas_tx = n_tx;
fp->nb_antennas_rx = n_rx;
fp->nb_antenna_ports_gNB = n_tx;
fp->N_RB_DL = N_RB_DL;
fp->Nid_cell = Nid_cell;
fp->Nid_SL = get_softmodem_params()->nid1 + get_softmodem_params()->nid2 * NUMBER_SSS_SEQUENCE;;
fp->nushift = 0; //No nushift in SL
fp->ssb_type = nr_ssb_type_C; //Note: case c for NR SL???
fp->freq_range = mu < 2 ? nr_FR1 : nr_FR2;
fp->nr_band = get_softmodem_params()->band; //Note: NR SL uses for n38 and n47
fp->threequarter_fs = 0;
fp->ofdm_offset_divisor = UINT_MAX;
fp->first_carrier_offset = 0;
fp->ssb_start_subcarrier = 12 * ue->nrUE_config.ssb_table.ssb_offset_point_a + ssb_subcarrier_offset;
int bw_index = get_supported_band_index(mu, fp->nr_band, N_RB_DL);
nrUE_config->carrier_config.dl_bandwidth = get_supported_bw_mhz(fp->nr_band > 256 ? FR2 : FR1, bw_index);
ue->slss = calloc(1, sizeof(*ue->slss));
int len = sizeof(ue->slss->sl_mib) / sizeof(ue->slss->sl_mib[0]);
for (int i = 0; i < len; i++) {
ue->slss->sl_mib[i] = 0;
}
ue->slss->sl_mib_length = 32;
ue->slss->sl_numssb_withinperiod_r16 = 16;
ue->slss->sl_timeinterval_r16 = 20;
ue->slss->sl_timeoffsetssb_r16 = 0;
ue->slss->sl_numssb_withinperiod_r16_copy = 16;
ue->slss->sl_timeinterval_r16_copy = 20;
ue->slss->sl_timeoffsetssb_r16_copy = 0;
ue->slss->slss_id = get_softmodem_params()->nid1 + get_softmodem_params()->nid2 * NUMBER_SSS_SEQUENCE;;
ue->is_synchronized_sl = 0;
ue->UE_fo_compensation = 0;
ue->sync_ref = get_softmodem_params()->sync_ref;
LOG_I(NR_PHY, "nrUE configured\n");
}
static void get_options(void) {
paramdef_t cmdline_params[] =CMDLINE_NRUEPARAMS_DESC ;
@@ -321,7 +398,7 @@ void init_openair0(void) {
NR_DL_FRAME_PARMS *frame_parms = &PHY_vars_UE_g[0][0]->frame_parms;
for (card=0; card<MAX_CARDS; card++) {
uint64_t dl_carrier, ul_carrier;
uint64_t dl_carrier, ul_carrier, sl_carrier;
openair0_cfg[card].configFilename = NULL;
openair0_cfg[card].threequarter_fs = frame_parms->threequarter_fs;
openair0_cfg[card].sample_rate = frame_parms->samples_per_subframe * 1e3;
@@ -348,8 +425,15 @@ void init_openair0(void) {
duplex_mode[openair0_cfg[card].duplex_mode]);
nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier);
LOG_I(NR_PHY,"Configuring SL carrier for %llu Hz \n",sl_carrier);
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
if (get_softmodem_params()->sl_mode != 0) {
nr_get_carrier_frequencies_sl(PHY_vars_UE_g[0][0], &sl_carrier);
LOG_I(NR_PHY,"Configuring SL carrier for %llu Hz \n",sl_carrier);
nr_rf_card_config_freq(&openair0_cfg[card], sl_carrier, sl_carrier, freq_off);
}
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
openair0_cfg[card].configFilename = get_softmodem_params()->rf_config_file;
@@ -508,8 +592,14 @@ int main( int argc, char **argv ) {
set_options(CC_id, UE[CC_id]);
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
if (get_softmodem_params()->sa) { // set frame config to initial values from command line and assume that the SSB is centered on the grid
if (get_softmodem_params()->sl_mode != 0) {
uint16_t nr_band = get_band(sidelink_frequency[CC_id][0],0);
mac->if_module = NULL;
LOG_I(HW, "Setting mac->if_module = NULL b/c we config PHY in nr_phy_config_request_sl (for now - TODO)\n");
nr_phy_config_request_sl(UE[CC_id], N_RB_DL, N_RB_DL, CC_id);
nr_init_frame_parms_ue_sl(&UE[CC_id]->frame_parms,sidelink_frequency[CC_id][0],nr_band);
}
if (get_softmodem_params()->sa) {
uint16_t nr_band = get_band(downlink_frequency[CC_id][0],uplink_frequency_offset[CC_id][0]);
mac->nr_band = nr_band;
nr_init_frame_parms_ue_sa(&UE[CC_id]->frame_parms,
@@ -517,15 +607,15 @@ int main( int argc, char **argv ) {
uplink_frequency_offset[CC_id][0],
get_softmodem_params()->numerology,
nr_band);
}
else{
DevAssert(mac->if_module != NULL && mac->if_module->phy_config_request != NULL);
mac->if_module->phy_config_request(&mac->phy_config);
mac->phy_config_request_sent = true;
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config,
*mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
} else {
if (mac->if_module != NULL && mac->if_module->phy_config_request != NULL) {
mac->if_module->phy_config_request(&mac->phy_config);
mac->phy_config_request_sent = true;
}
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, &UE[CC_id]->nrUE_config,
((get_softmodem_params()->sl_mode == 0) ?
*mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0] :
UE[CC_id]->frame_parms.nr_band));
}
init_nr_ue_vars(UE[CC_id], 0, abstraction_flag);
@@ -636,3 +726,56 @@ static void init_bler_table(char *env_string) {
fclose(pFile);
}
}
// Read in each MCS file and build BLER-SINR-TB table
static void init_mimo_bler_table(void) {
memset(nr_mimo_bler_data, 0, sizeof(nr_mimo_bler_data));
const char *awgn_results_dir = getenv("NR_MIMO2x2_AWGN_RESULTS_DIR");
if (!awgn_results_dir) {
LOG_W(NR_MAC, "No $NR_MIMO2x2_AWGN_RESULTS_DIR\n");
return;
}
for (unsigned int i = 0; i < NR_NUM_MCS; i++) {
char fName[1024];
snprintf(fName, sizeof(fName), "%s/mcs%d_cdlc_mimo2x2_dl.csv", awgn_results_dir, i);
FILE *pFile = fopen(fName, "r");
if (!pFile) {
LOG_E(NR_MAC, "open %s: %s\n", fName, strerror(errno));
continue;
}
size_t bufSize = 1024;
char * line = NULL;
char * token;
char * temp = NULL;
int nlines = 0;
while (getline(&line, &bufSize, pFile) > 0) {
if (!strncmp(line, "SNR", 3)) {
continue;
}
if (nlines > NR_NUM_SINR) {
LOG_E(NR_MAC, "BLER FILE ERROR - num lines greater than expected - file: %s\n", fName);
abort();
}
token = strtok_r(line, ";", &temp);
int ncols = 0;
while (token != NULL) {
if (ncols > NUM_BLER_COL) {
LOG_E(NR_MAC, "BLER FILE ERROR - num of cols greater than expected\n");
abort();
}
nr_mimo_bler_data[i].bler_table[nlines][ncols] = strtof(token, NULL);
ncols++;
token = strtok_r(NULL, ";", &temp);
}
nlines++;
}
nr_mimo_bler_data[i].length = nlines;
fclose(pFile);
}
}

View File

@@ -42,6 +42,7 @@
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH, 0, .strptr=&rrc_config_path, .defstrval="./", TYPE_STRING, 0}, \
{"ue-idx-standalone", NULL, 0, .u16ptr=&ue_idx_standalone, .defuintval=0xFFFF, TYPE_UINT16, 0}, \
{"SLC", CONFIG_HLP_SLF, 0, .u64ptr=&(sidelink_frequency[0][0]), .defuintval=2600000000, TYPE_UINT64, 0}, \
{"ue-rxgain", CONFIG_HLP_UERXG, 0, .dblptr=&(rx_gain[0][0]), .defdblval=110, TYPE_DOUBLE, 0}, \
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, .dblptr=&rx_gain_off, .defdblval=0, TYPE_DOUBLE, 0}, \
{"ue-txgain", CONFIG_HLP_UETXG, 0, .dblptr=&(tx_gain[0][0]), .defdblval=0, TYPE_DOUBLE, 0}, \

View File

@@ -55,8 +55,10 @@ extern "C"
#define CONFIG_HLP_DUMPFRAME "dump UE received frame to rxsig_frame0.dat and exit\n"
#define CONFIG_HLP_PHYTST "test UE phy layer, mac disabled\n"
#define CONFIG_HLP_SL_PHYTST "test SL UE phy layer, mac disabled\n"
#define CONFIG_HLP_DORA "test gNB and UE with RA procedures\n"
#define CONFIG_HLP_SA "run gNB in standalone mode\n"
#define CONFIG_HLP_SL_MODE "sets the NR sidelink mode (0: not in sidelink mode, 1: in-coverage/gNB, 2: out-of-coverage/no gNB)"
#define CONFIG_HLP_EXTS "tells hardware to use an external timing reference\n"
#define CONFIG_HLP_DMRSSYNC "tells RU to insert DMRS in subframe 1 slot 0"
#define CONFIG_HLP_CLK "tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)\n"
@@ -66,6 +68,7 @@ extern "C"
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
#define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n"
#define CONFIG_HLP_ULF "Set the uplink frequency offset for all component carriers\n"
#define CONFIG_HLP_SLF "Set the sidelink frequency for all component carriers\n"
#define CONFIG_HLP_CHOFF "Channel id offset\n"
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
#define CONFIG_HLP_SOFTS_QT "Enable soft scope and L1 and L2 stats (QT)\n"
@@ -103,6 +106,9 @@ extern "C"
#define CONFIG_L1_EMULATOR "Run in L1 emulated mode (disable PHY layer)\n"
#define CONFIG_HLP_CONTINUOUS_TX "perform continuous transmission, even in TDD mode (to work around USRP issues)\n"
#define CONFIG_HLP_STATS_DISABLE "disable globally the stats generation and persistence"
#define CONFIG_HLP_SYNC_REF "Sync Reference in Sidelink\n"
#define CONFIG_HLP_NID1 "Set NID1 value in Sidelink\n"
#define CONFIG_HLP_NID2 "Set NID2 value in Sidelink\n"
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to eNodeB and UE */
@@ -111,8 +117,10 @@ extern "C"
#define RF_CONFIG_FILE softmodem_params.rf_config_file
#define TP_CONFIG softmodem_params.threadPoolConfig
#define PHY_TEST softmodem_params.phy_test
#define SL_PHY_TEST softmodem_params.sl_phy_test
#define DO_RA softmodem_params.do_ra
#define SA softmodem_params.sa
#define SL_MODE softmodem_params.sl_mode
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
#define CHAIN_OFFSET softmodem_params.chain_offset
@@ -132,6 +140,9 @@ extern "C"
#define NON_STOP softmodem_params.non_stop
#define EMULATE_L1 softmodem_params.emulate_l1
#define CONTINUOUS_TX softmodem_params.continuous_tx
#define SYNC_REF softmodem_params.sync_ref
#define NID1 softmodem_params.nid1
#define NID2 softmodem_params.nid2
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
@@ -143,6 +154,8 @@ extern int usrp_tx_thread;
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, .iptr=&PHY_TEST, .defintval=0, TYPE_INT, 0}, \
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, .iptr=&DO_RA, .defintval=0, TYPE_INT, 0}, \
{"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, .iptr=&SA, .defintval=0, TYPE_INT, 0}, \
{"sl-mode", CONFIG_HLP_SL_MODE, 0, .u8ptr=&SL_MODE, .defintval=0, TYPE_UINT8, 0}, \
{"sync-ref", CONFIG_HLP_SYNC_REF, PARAMFLAG_BOOL, .iptr=&SYNC_REF, .defintval=0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, .u8ptr=&USIM_TEST, .defintval=0, TYPE_UINT8, 0}, \
{"clock-source", CONFIG_HLP_CLK, 0, .uptr=&CLOCK_SOURCE, .defintval=0, TYPE_UINT, 0}, \
{"time-source", CONFIG_HLP_TME, 0, .uptr=&TIMING_SOURCE, .defintval=0, TYPE_UINT, 0}, \
@@ -174,6 +187,8 @@ extern int usrp_tx_thread;
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, .iptr=&EMULATE_L1, .defintval=0, TYPE_INT, 0}, \
{"continuous-tx", CONFIG_HLP_CONTINUOUS_TX, PARAMFLAG_BOOL, .iptr=&CONTINUOUS_TX, .defintval=0, TYPE_INT, 0}, \
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \
{"nid1", CONFIG_HLP_NID1, 0, .iptr=&NID1, .defintval=10, TYPE_INT, 0}, \
{"nid2", CONFIG_HLP_NID2, 0, .iptr=&NID2, .defintval=1, TYPE_INT, 0}, \
}
// clang-format on
@@ -210,6 +225,8 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s3a = { config_checkstr_assign_integer, \
{"MONOLITHIC", "PNF", "VNF","UE_STUB_PNF","UE_STUB_OFFNET","STANDALONE_PNF"}, \
{NFAPI_MONOLITHIC, NFAPI_MODE_PNF, NFAPI_MODE_VNF,NFAPI_UE_STUB_PNF,NFAPI_UE_STUB_OFFNET,NFAPI_MODE_STANDALONE_PNF}, \
@@ -218,6 +235,8 @@ extern int usrp_tx_thread;
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
// clang-format on
@@ -301,8 +320,10 @@ typedef struct {
char *rf_config_file;
char *threadPoolConfig;
int phy_test;
int sl_phy_test;
int do_ra;
int sa;
uint8_t sl_mode;
uint8_t usim_test;
int emulate_rf;
int wait_for_sync; //eNodeB only
@@ -324,6 +345,9 @@ typedef struct {
int non_stop;
int emulate_l1;
int continuous_tx;
int sync_ref;
int nid1;
int nid2;
} softmodem_params_t;
extern uint64_t get_softmodem_optmask(void);

View File

@@ -559,7 +559,9 @@ typedef struct {
typedef struct
{
uint16_t dl_bandwidth;//Carrier bandwidth for DL in MHz [38.104, sec 5.3.2] Values: 5, 10, 15, 20, 25, 30, 40,50, 60, 70, 80,90,100,200,400
uint16_t sl_bandwidth; //Carrier bandwidth for SL in MHz [38.101, sec 5.3.5] Values: 10, 20, 30, and 40
uint32_t dl_frequency; //Absolute frequency of DL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
uint32_t sl_frequency; //Absolute frequency of SL point A in KHz [38.331, sec6.3.5 and 38.211 sec 8.2.7]
uint16_t dl_k0[5];//𝑘_{0}^{𝜇} for each of the numerologies [38.211, sec 5.3.1] Value: 0 ->23699
uint16_t dl_grid_size[5];//Grid size 𝑁_{𝑔𝑟𝑖𝑑}^{𝑠𝑖𝑧𝑒,𝜇} for each of the numerologies [38.211, sec 4.4.2] Value: 0->275 0 = this numerology not used
uint16_t num_tx_ant;//Number of Tx antennas

View File

@@ -28,10 +28,10 @@
//#define DEBUG_CCODE 1
unsigned short glte[] = { 0133, 0171, 0165 }; // {A,B}
unsigned short glte_rev[] = { 0155, 0117, 0127 }; // {A,B}
unsigned short gdab[] = { 0133, 0171, 0145 }; // {A,B}
unsigned short gdab_rev[] = { 0155, 0117, 0123 }; // {A,B}
static const unsigned short glte[] = {0133, 0171, 0165}; // {A,B}
static const unsigned short glte_rev[] = {0155, 0117, 0127}; // {A,B}
static const unsigned short gdab[] = {0133, 0171, 0145}; // {A,B}
static const unsigned short gdab_rev[] = {0155, 0117, 0123}; // {A,B}
unsigned char ccodelte_table[128]; // for transmitter
unsigned char ccodelte_table_rev[128]; // for receiver

View File

@@ -44,18 +44,20 @@
/*ref 36-212 v8.6.0 , pp 8-9 */
/* the highest degree is set by default */
uint32_t poly24a = 0x864cfb00; // 1000 0110 0100 1100 1111 1011
// D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
uint32_t poly24b = 0x80006300; // 1000 0000 0000 0000 0110 0011
// D^24 + D^23 + D^6 + D^5 + D + 1
uint32_t poly24c = 0xb2b11700; // 1011 0010 1011 0001 0001 0111
// D^24+D^23+D^21+D^20+D^17+D^15+D^13+D^12+D^8+D^4+D^2+D+1
uint32_t poly16 = 0x10210000; // 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
uint32_t poly12 = 0x80F00000; // 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
uint32_t poly8 = 0x9B000000; // 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
uint32_t poly6 = 0x84000000; // 10000100000... -> D^6+D^5+1
uint32_t poly11 = 0xc4200000; //11000100001000... -> D^11+D^10+D^9+D^5+1
static const uint32_t poly24a =
0x864cfb00; // 1000 0110 0100 1100 1111 1011
// D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
static const uint32_t poly24b = 0x80006300; // 1000 0000 0000 0000 0110 0011
// D^24 + D^23 + D^6 + D^5 + D + 1
static const uint32_t poly24c = 0xb2b11700; // 1011 0010 1011 0001 0001 0111
// D^24+D^23+D^21+D^20+D^17+D^15+D^13+D^12+D^8+D^4+D^2+D+1
static const uint32_t poly16 = 0x10210000; // 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
static const uint32_t poly12 = 0x80F00000; // 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
static const uint32_t poly8 = 0x9B000000; // 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
static const uint32_t poly6 = 0x84000000; // 10000100000... -> D^6+D^5+1
static const uint32_t poly11 = 0xc4200000; // 11000100001000... -> D^11+D^10+D^9+D^5+1
/*********************************************************
@@ -100,24 +102,20 @@ static uint32_t crc8Table[256];
static uint32_t crc6Table[256];
#if USE_INTEL_CRC
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq, 16) = {
0x64e4d700, /**< k1 */
0x2c8c9d00, /**< k2 */
0xd9fe8c00, /**< k3 */
0xf845fe24, /**< q */
0x864cfb00, /**< p */
0ULL /**< res */
static const struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq __attribute__((aligned(16))) = {
0x64e4d700, /**< k1 */
0x2c8c9d00, /**< k2 */
0xd9fe8c00, /**< k3 */
0xf845fe24, /**< q */
0x864cfb00, /**< p */
0ULL /**< res */
};
__m128i crc_xmm_be_le_swap128;
DECLARE_ALIGNED(const uint8_t crc_xmm_shift_tab[48], 16) = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
const uint8_t crc_xmm_shift_tab[48]
__attribute__((aligned(16))) = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#endif
@@ -176,13 +174,13 @@ uint32_t crc24a(unsigned char* inptr, int bitlen)
}
#if USE_INTEL_CRC
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq, 16) = {
0x80140500, /**< k1 */
0x42000100, /**< k2 */
0x90042100, /**< k3 */
0xffff83ff, /**< q */
0x80006300, /**< p */
0ULL /**< res */
static const struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq __attribute__((aligned(16))) = {
0x80140500, /**< k1 */
0x42000100, /**< k2 */
0x90042100, /**< k3 */
0xffff83ff, /**< q */
0x80006300, /**< p */
0ULL /**< res */
};
#endif
uint32_t crc24b(unsigned char* inptr, int bitlen)

View File

@@ -33,9 +33,12 @@
//#define cmin(a,b) ((a)<(b) ? (a) : (b))
static uint32_t bitrev[32] = {0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31};
static uint32_t bitrev_x3[32] = {0,48,24,72,12,60,36,84,6,54,30,78,18,66,42,90,3,51,27,75,15,63,39,87,9,57,33,81,21,69,45,93};
static uint32_t bitrev_cc[32] = {1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31,0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30};
static const uint32_t bitrev[32] = {0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30,
1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31};
static const uint32_t bitrev_x3[32] = {0, 48, 24, 72, 12, 60, 36, 84, 6, 54, 30, 78, 18, 66, 42, 90,
3, 51, 27, 75, 15, 63, 39, 87, 9, 57, 33, 81, 21, 69, 45, 93};
static const uint32_t bitrev_cc[32] = {1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31,
0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30};
//#define RM_DEBUG_TX 1
//#define RM_DEBUG 1

View File

@@ -22,12 +22,12 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
// ----- Old implementation ----
uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits){
uint8_t crcPolynomialPattern[25] = {1,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,0,0,0,1,0,1,1,1};
// 1011 0010 1011 0001 0001 0111 D^24 + D^23 + D^21 + D^20 + D^17 + D^15 + D^13 + D^12 + D^8 + D^4 + D^2 + D + 1
uint8_t crcPolynomialSize = 24;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits)
{
uint8_t crcPolynomialPattern[25] = {1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1};
// 1011 0010 1011 0001 0001 0111 D^24 + D^23 + D^21 + D^20 + D^17 + D^15 + D^13 + D^12 + D^8 + D^4 + D^2 + D + 1
uint8_t crcPolynomialSize = 24;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits*sizeof(uint8_t *) + payloadSizeBits*crcPolynomialSize*sizeof(uint8_t));
if (crc_generator_matrix)
@@ -52,74 +52,5 @@ uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits){
crc_generator_matrix[i][j]=0;
}
}
return crc_generator_matrix;
}
uint8_t **crc11_generator_matrix(uint16_t payloadSizeBits){
uint8_t crcPolynomialPattern[12] = {1,1,1,0,0,0,1,0,0,0,0,1};
// 1110 0010 0001 D^11 + D^10 + D^9 + D^5 + 1
uint8_t crcPolynomialSize = 11;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits * sizeof(uint8_t *));
if (crc_generator_matrix)
for (int i = 0; i < payloadSizeBits; i++)
crc_generator_matrix[i] = malloc(crcPolynomialSize * sizeof(uint8_t));
for (int i = 0; i < crcPolynomialSize; i++) crc_generator_matrix[payloadSizeBits-1][i]=crcPolynomialPattern[i+1];
for (int i = payloadSizeBits-2; i >= 0; i--){
for (int j = 0; j < crcPolynomialSize-1; j++)
temp1[j]=crc_generator_matrix[i+1][j+1];
temp1[crcPolynomialSize-1]=0;
for (int j = 0; j < crcPolynomialSize; j++)
temp2[j]=crc_generator_matrix[i+1][0]*crcPolynomialPattern[j+1];
for (int j = 0; j < crcPolynomialSize; j++){
if(temp1[j]+temp2[j] == 1)
crc_generator_matrix[i][j]=1;
else
crc_generator_matrix[i][j]=0;
}
}
return crc_generator_matrix;
}
uint8_t **crc6_generator_matrix(uint16_t payloadSizeBits){
uint8_t crcPolynomialPattern[7] = {1,1,0,0,0,0,1};
// 0110 0001 D^6 + D^5 + 1
uint8_t crcPolynomialSize = 6;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits * sizeof(uint8_t *));
if (crc_generator_matrix)
for (int i = 0; i < payloadSizeBits; i++)
crc_generator_matrix[i] = malloc(crcPolynomialSize * sizeof(uint8_t));
for (int i = 0; i < crcPolynomialSize; i++)
crc_generator_matrix[payloadSizeBits-1][i]=crcPolynomialPattern[i+1];
for (int i = payloadSizeBits-2; i >= 0; i--){
for (int j = 0; j < crcPolynomialSize-1; j++)
temp1[j]=crc_generator_matrix[i+1][j+1];
temp1[crcPolynomialSize-1]=0;
for (int j = 0; j < crcPolynomialSize; j++)
temp2[j]=crc_generator_matrix[i+1][0]*crcPolynomialPattern[j+1];
for (int j = 0; j < crcPolynomialSize; j++){
if(temp1[j]+temp2[j] == 1)
crc_generator_matrix[i][j]=1;
else
crc_generator_matrix[i][j]=0;
}
}
return crc_generator_matrix;
return (const uint8_t **)crc_generator_matrix;
}

View File

@@ -351,9 +351,17 @@ void applyGtoright(const t_nrPolar_params *pp,decoder_node_t *node) {
((__m64 *)alpha_r)[0] = _mm_subs_pi16(((__m64 *)alpha_v)[1],_mm_sign_pi16(((__m64 *)alpha_v)[0],((__m64 *)betal)[0]));
}
else
{// equivalent scalar code to above, activated only on non x86/ARM architectures or Nv=1,2
for (int i=0;i<node->Nv/2;i++) {
alpha_r[i] = alpha_v[i+(node->Nv/2)] - (betal[i]*alpha_v[i]);
{
int temp_alpha_r;
for (int i = 0; i < node->Nv / 2; i++) {
temp_alpha_r = alpha_v[i + (node->Nv / 2)] - (betal[i] * alpha_v[i]);
if (temp_alpha_r > SHRT_MAX) {
alpha_r[i] = SHRT_MAX;
} else if (temp_alpha_r < -SHRT_MAX) {
alpha_r[i] = -SHRT_MAX;
} else {
alpha_r[i] = temp_alpha_r;
}
}
}
if (node->Nv == 2) { // apply hard decision on right node
@@ -366,7 +374,7 @@ void applyGtoright(const t_nrPolar_params *pp,decoder_node_t *node) {
}
}
int16_t all1[16] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
static const int16_t all1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
void computeBeta(const t_nrPolar_params *pp,decoder_node_t *node) {

View File

@@ -42,6 +42,7 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h"
#include "PHY/CODING/coding_defs.h"
//#include "SIMULATION/TOOLS/sim.h"
@@ -109,8 +110,8 @@ struct nrPolar_params {
uint16_t *channel_interleaver_pattern;
//uint32_t crc_polynomial;
uint8_t **crc_generator_matrix; //G_P
uint8_t **G_N;
const uint8_t **crc_generator_matrix; // G_P
const uint8_t **G_N;
uint64_t **G_N_tab;
int groupsize;
int *rm_tab;
@@ -205,7 +206,7 @@ t_nrPolar_params *nr_polar_params (int8_t messageType,
uint16_t nr_polar_aggregation_prime (uint8_t aggregation_level);
uint8_t **nr_polar_kronecker_power_matrices(uint8_t n);
const uint8_t **nr_polar_kronecker_power_matrices(uint8_t n);
const uint16_t *nr_polar_sequence_pattern(uint8_t n);
@@ -270,11 +271,7 @@ void nr_byte2bit_uint8_32(uint8_t *in,
uint16_t arraySize,
uint32_t *out);
uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits);
uint8_t **crc11_generator_matrix(uint16_t payloadSizeBits);
uint8_t **crc6_generator_matrix(uint16_t payloadSizeBits);
const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits);
void nr_polar_bit_insertion(uint8_t *input,
uint8_t *output,
@@ -284,11 +281,11 @@ void nr_polar_bit_insertion(uint8_t *input,
int16_t *Q_PC_N,
uint8_t n_PC);
void nr_matrix_multiplication_uint8_1D_uint8_2D(uint8_t *matrix1,
uint8_t **matrix2,
uint8_t *output,
uint16_t row,
uint16_t col);
void nr_matrix_multiplication_uint8_1D_uint8_2D(const uint8_t *matrix1,
const uint8_t **matrix2,
uint8_t *output,
uint16_t row,
uint16_t col);
void nr_sort_asc_double_1D_array_ind(double *matrix,
uint8_t *ind,

View File

@@ -32,15 +32,18 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
void nr_matrix_multiplication_uint8_1D_uint8_2D(uint8_t *matrix1, uint8_t **matrix2,
uint8_t *output, uint16_t row, uint16_t col) {
for (uint16_t i = 0; i < col; i++) {
output[i] = 0;
for (uint16_t j = 0; j < row; j++) {
void nr_matrix_multiplication_uint8_1D_uint8_2D(const uint8_t *matrix1,
const uint8_t **matrix2,
uint8_t *output,
uint16_t row,
uint16_t col)
{
for (uint16_t i = 0; i < col; i++) {
output[i] = 0;
for (uint16_t j = 0; j < row; j++) {
output[i] += matrix1[j] * matrix2[j][i];
}
}
}
}
// Modified Bubble Sort.

View File

@@ -35,6 +35,7 @@
#define NR_POLAR_PBCH_AGGREGATION_LEVEL 0 //uint8_t
#define NR_POLAR_PBCH_MESSAGE_TYPE 0 //int8_t
#define NR_POLAR_PSBCH_MESSAGE_TYPE 3 //int8_t
#define NR_POLAR_PBCH_PAYLOAD_BITS 32 //uint16_t
#define NR_POLAR_PBCH_CRC_PARITY_BITS 24
#define NR_POLAR_PBCH_CRC_ERROR_CORRECTION_BITS 3
@@ -52,6 +53,8 @@
#define NR_POLAR_PBCH_I_BIL 0 //uint8_t
#define NR_POLAR_PBCH_E 864 //uint16_t
#define NR_POLAR_PBCH_E_DWORD 27 // NR_POLAR_PBCH_E/32
#define NR_POLAR_PSBCH_E 1792 //uint16_t
#define NR_POLAR_PSBCH_E_DWORD 56 // NR_POLAR_PSBCH_E/32
/*
* TEST CODE

View File

@@ -0,0 +1,70 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*!\file PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h
* \brief Defines the constant variables for polar coding of the PSBCH from 38-212, V15.1.1 2018-04.
* \author Turker Yilmaz
* \date 2018
* \version 0.1
* \company EURECOM
* \email turker.yilmaz@eurecom.fr
* \note
* \warning
*/
#ifndef __NR_POLAR_PSBCH_DEFS__H__
#define __NR_POLAR_PSBCH_DEFS__H__
#define NR_POLAR_PSBCH_AGGREGATION_LEVEL 0 //uint8_t
#define NR_POLAR_PSBCH_MESSAGE_TYPE 3 //int8_t
#define NR_POLAR_PSBCH_PAYLOAD_BITS 32 //uint16_t
#define NR_POLAR_PSBCH_CRC_PARITY_BITS 24
#define NR_POLAR_PSBCH_CRC_ERROR_CORRECTION_BITS 3
//Assumed 3 by 3GPP when NR_POLAR_PSBCH_L>8 to meet false alarm rate requirements.
//Sec. 7.1.4: Channel Coding
#define NR_POLAR_PSBCH_N_MAX 9 //uint8_t
#define NR_POLAR_PSBCH_I_IL 1 //uint8_t
#define NR_POLAR_PSBCH_I_SEG 0 //uint8_t
#define NR_POLAR_PSBCH_N_PC 0 //uint8_t
#define NR_POLAR_PSBCH_N_PC_WM 0 //uint8_t
//#define NR_POLAR_PSBCH_N 512 //uint16_t
//Sec. 7.1.5: Rate Matching
#define NR_POLAR_PSBCH_I_BIL 0 //uint8_t
#define NR_POLAR_PSBCH_E 1792 //uint16_t
#define NR_POLAR_PSBCH_E_DWORD 56 // NR_POLAR_PSBCH_E/32
/*
* TEST CODE
*/
//#define DEBUG_POLAR
// Usage in code:
//#ifdef DEBUG_POLAR
//...
//#endif
//unsigned int testPayload0=0x00000000, testPayload1=0xffffffff; //payload1=~payload0;
//unsigned int testPayload2=0xa5a5a5a5; //testPayload3=0xb3f02c82;
//double testReceivedPayload3[NR_POLAR_PSBCH_E] = {-1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1};
#endif

File diff suppressed because one or more lines are too long

View File

@@ -193,7 +193,18 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui
newPolarInitNode->payloadBits = messageLength;
newPolarInitNode->crcCorrectionBits = NR_POLAR_PUCCH_CRC_ERROR_CORRECTION_BITS;
//LOG_D(PHY,"New polar node, encoderLength %d, aggregation_level %d\n",newPolarInitNode->encoderLength,aggregation_level);
} else if (messageType == 3) { // PSBCH
newPolarInitNode->n_max = NR_POLAR_PSBCH_N_MAX;
newPolarInitNode->i_il = NR_POLAR_PSBCH_I_IL;
newPolarInitNode->i_seg = NR_POLAR_PSBCH_I_SEG;
newPolarInitNode->n_pc = NR_POLAR_PSBCH_N_PC;
newPolarInitNode->n_pc_wm = NR_POLAR_PSBCH_N_PC_WM;
newPolarInitNode->i_bil = NR_POLAR_PSBCH_I_BIL;
newPolarInitNode->crcParityBits = NR_POLAR_PSBCH_CRC_PARITY_BITS;
newPolarInitNode->payloadBits = NR_POLAR_PSBCH_PAYLOAD_BITS;
newPolarInitNode->encoderLength = NR_POLAR_PSBCH_E;
newPolarInitNode->crcCorrectionBits = NR_POLAR_PSBCH_CRC_ERROR_CORRECTION_BITS;
newPolarInitNode->crc_generator_matrix = crc24c_generator_matrix(newPolarInitNode->payloadBits);//G_P
} else {
AssertFatal(1 == 0, "[nr_polar_init] Incorrect Message Type(%d)", messageType);
}

View File

@@ -36,15 +36,10 @@
#include <math.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include <openair1/PHY/LTE_ESTIMATION/lte_estimation.h>
extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
extern int32_t get_uldl_offset(int eutra_bandP);
extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138];
uint8_t dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 };
const uint8_t dmrs1_tab[8] = {0, 2, 3, 4, 6, 8, 9, 10};
int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 };
const int N_RB_DL_array[6] = {6, 15, 25, 50, 75, 100};
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;

View File

@@ -35,6 +35,7 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "PHY/phy_extern.h"
void init_7_5KHz(void);
uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
@@ -360,8 +361,6 @@ void phy_config_harq_ue(module_id_t Mod_id,
phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx;
}
extern uint16_t beta_cqi[16];
void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated ) {
static uint8_t first_dedicated_configuration = 0;

View File

@@ -22,8 +22,8 @@
#include "phy_init.h"
#include "common/utils/LOG/log.h"
uint16_t dl_S_table_normal[10]= {3,9,10,11,12,3,9,10,11,6};
uint16_t dl_S_table_extended[10]= {3,8,9,10,3,8,9,5,0,0};
static const uint16_t dl_S_table_normal[10] = {3, 9, 10, 11, 12, 3, 9, 10, 11, 6};
static const uint16_t dl_S_table_extended[10] = {3, 8, 9, 10, 3, 8, 9, 5, 0, 0};
void set_S_config(LTE_DL_FRAME_PARMS *fp) {
int X = fp->srsX;

View File

@@ -26,6 +26,7 @@
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "openair1/PHY/MODULATION/nr_modulation.h"
@@ -38,7 +39,7 @@
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "nfapi_nr_interface.h"
#include "executables/softmodem-common.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"

View File

@@ -35,9 +35,9 @@
#include "PHY/MODULATION/nr_modulation.h"
#include "openair2/COMMON/prs_nr_paramdef.h"
#include "SCHED_NR_UE/harq_nr.h"
#include <nr-uesoftmodem.h>
extern uint16_t beta_cqi[16];
void RCconfig_nrUE_prs(void *cfg)
{
@@ -202,6 +202,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
// create shortcuts
NR_DL_FRAME_PARMS *const fp = &ue->frame_parms;
NR_UE_COMMON *const common_vars = &ue->common_vars;
NR_UE_PSBCH **const psbch_vars = ue->psbch_vars;
NR_UE_PRACH **const prach_vars = ue->prach_vars;
NR_UE_CSI_IM **const csiim_vars = ue->csiim_vars;
NR_UE_CSI_RS **const csirs_vars = ue->csirs_vars;
@@ -353,6 +354,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
// DLSCH
for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
prach_vars[gNB_id] = (NR_UE_PRACH *)malloc16_clear(sizeof(NR_UE_PRACH));
psbch_vars[gNB_id] = (NR_UE_PSBCH *)malloc16_clear(sizeof(NR_UE_PSBCH));
csiim_vars[gNB_id] = (NR_UE_CSI_IM *)malloc16_clear(sizeof(NR_UE_CSI_IM));
csirs_vars[gNB_id] = (NR_UE_CSI_RS *)malloc16_clear(sizeof(NR_UE_CSI_RS));
srs_vars[gNB_id] = (NR_UE_SRS *)malloc16_clear(sizeof(NR_UE_SRS));
@@ -471,6 +473,7 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
free_and_zero(ue->csirs_vars[gNB_id]);
free_and_zero(ue->srs_vars[gNB_id]);
free_and_zero(ue->psbch_vars[gNB_id]);
free_and_zero(ue->prach_vars[gNB_id]);
}
@@ -700,7 +703,12 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
crcTableInit();
init_scrambling_luts();
load_dftslib();
frame_parms->Nid_SL = 0;
init_context_synchro_nr(frame_parms);
if (get_softmodem_params()->sl_mode>0) {
frame_parms->Nid_SL = 336;
init_context_synchro_nr(frame_parms);
}
generate_ul_reference_signal_sequences(SHRT_MAX);
}

View File

@@ -22,65 +22,31 @@
#include "nr_phy_init.h"
#include "common/utils/nr/nr_common.h"
#include "common/utils/LOG/log.h"
#include "executables/softmodem-common.h"
/// Subcarrier spacings in Hz indexed by numerology index
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
static const uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
static const uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
// Table 5.4.3.3-1 38-101
int nr_ssb_table[48][3] = {
{1, 15, nr_ssb_type_A},
{2, 15, nr_ssb_type_A},
{3, 15, nr_ssb_type_A},
{5, 15, nr_ssb_type_A},
{5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A},
{8, 15, nr_ssb_type_A},
{12, 15, nr_ssb_type_A},
{14, 15, nr_ssb_type_A},
{18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A},
{25, 15, nr_ssb_type_A},
{26, 15, nr_ssb_type_A},
{28, 15, nr_ssb_type_A},
{29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A},
{34, 15, nr_ssb_type_A},
{34, 30, nr_ssb_type_C},
{38, 15, nr_ssb_type_A},
{38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A},
{39, 30, nr_ssb_type_C},
{40, 30, nr_ssb_type_C},
{41, 15, nr_ssb_type_A},
{41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C},
{48, 30, nr_ssb_type_C},
{50, 30, nr_ssb_type_C},
{51, 15, nr_ssb_type_A},
{53, 15, nr_ssb_type_A},
{65, 15, nr_ssb_type_A},
{66, 15, nr_ssb_type_A},
{66, 30, nr_ssb_type_B},
{70, 15, nr_ssb_type_A},
{71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A},
{75, 15, nr_ssb_type_A},
{76, 15, nr_ssb_type_A},
{77, 30, nr_ssb_type_C},
{78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C},
{90, 15, nr_ssb_type_A},
{90, 30, nr_ssb_type_C},
{91, 15, nr_ssb_type_A},
{92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A},
{94, 15, nr_ssb_type_A},
{96, 30, nr_ssb_type_C}
};
static const int nr_ssb_table[48][3] = {
{1, 15, nr_ssb_type_A}, {2, 15, nr_ssb_type_A}, {3, 15, nr_ssb_type_A}, {5, 15, nr_ssb_type_A}, {5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A}, {8, 15, nr_ssb_type_A}, {12, 15, nr_ssb_type_A}, {14, 15, nr_ssb_type_A}, {18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A}, {25, 15, nr_ssb_type_A}, {26, 15, nr_ssb_type_A}, {28, 15, nr_ssb_type_A}, {29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A}, {34, 15, nr_ssb_type_A}, {34, 30, nr_ssb_type_C}, {38, 15, nr_ssb_type_A}, {38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A}, {39, 30, nr_ssb_type_C}, {40, 30, nr_ssb_type_C}, {41, 15, nr_ssb_type_A}, {41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C}, {48, 30, nr_ssb_type_C}, {50, 30, nr_ssb_type_C}, {51, 15, nr_ssb_type_A}, {53, 15, nr_ssb_type_A},
{65, 15, nr_ssb_type_A}, {66, 15, nr_ssb_type_A}, {66, 30, nr_ssb_type_B}, {70, 15, nr_ssb_type_A}, {71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A}, {75, 15, nr_ssb_type_A}, {76, 15, nr_ssb_type_A}, {77, 30, nr_ssb_type_C}, {78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C}, {90, 15, nr_ssb_type_A}, {90, 30, nr_ssb_type_C}, {91, 15, nr_ssb_type_A}, {92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A}, {94, 15, nr_ssb_type_A}, {96, 30, nr_ssb_type_C}};
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
if (get_softmodem_params()->sl_mode == 2) {
fp->Lmax = 1;
return;
}
// definition of Lmax according to ts 38.213 section 4.1
if (fp->dl_CarrierFreq < 6e9) {
if(fp->frame_type && (fp->ssb_type==2))
@@ -190,7 +156,10 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
while(fp->ofdm_symbol_size < N_RB_DL * 12)
fp->ofdm_symbol_size <<= 1;
fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2);
if (get_softmodem_params()->sl_mode == 2)
fp->first_carrier_offset = 0;
else
fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2);
fp->nb_prefix_samples = fp->ofdm_symbol_size / 128 * 9;
fp->nb_prefix_samples0 = fp->ofdm_symbol_size / 128 * (9 + (1 << mu));
LOG_W(PHY,"Init: N_RB_DL %d, first_carrier_offset %d, nb_prefix_samples %d,nb_prefix_samples0 %d, ofdm_symbol_size %d\n",
@@ -323,6 +292,10 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
LOG_D(PHY,"dl_bw_kHz %lu\n",dl_bw_khz);
LOG_D(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq);
if (get_softmodem_params()->sl_mode != 0) {
fp->sl_CarrierFreq = ((dl_bw_khz >> 1) + config->carrier_config.sl_frequency) * 1000;
}
uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ;
@@ -372,6 +345,9 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
}
fp->ssb_start_subcarrier = (12 * config->ssb_table.ssb_offset_point_a + sco);
if (get_softmodem_params()->sl_mode == 2) {
fp->ssb_start_subcarrier = 0;
}
set_Lmax(fp);
fp->L_ssb = (((uint64_t) config->ssb_table.ssb_mask_list[0].ssb_mask)<<32) | config->ssb_table.ssb_mask_list[1].ssb_mask;
@@ -421,6 +397,11 @@ void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink
}
void nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *frame_parms, uint64_t sidelink_frequency, uint16_t nr_band) {
LOG_D(NR_PHY, "SL init parameters. SL freq %lu\n", sidelink_frequency);
frame_parms->sl_CarrierFreq = sidelink_frequency;
frame_parms->nr_band = nr_band;
}
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp)
{

View File

@@ -29,6 +29,7 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb);
int nr_init_frame_parms(nfapi_nr_config_request_scf_t *config, NR_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, fapi_nr_config_request_t *config, uint16_t nr_band);
void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink_frequency, int32_t uplink_frequency_offset, uint8_t mu, uint16_t nr_band);
void nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *frame_parms, uint64_t sidelink_frequency, uint16_t nr_band);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB);
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB);
void init_nr_ue_transport(PHY_VARS_NR_UE *ue);
@@ -55,5 +56,5 @@ void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES],
void phy_init_nr_top(PHY_VARS_NR_UE *ue);
void phy_term_nr_top(void);
void init_dfts(void);
#endif

View File

@@ -29,9 +29,40 @@
#include "openair1/PHY/LTE_TRANSPORT/transport_vars.h"
// round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15))
static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766};
static const int16_t ru_90[2 * 128] = {
32767, 0, 32766, 402, 32758, 804, 32746, 1206, 32729, 1608, 32706, 2009, 32679, 2411, 32647, 2811, 32610, 3212,
32568, 3612, 32522, 4011, 32470, 4410, 32413, 4808, 32352, 5205, 32286, 5602, 32214, 5998, 32138, 6393, 32058, 6787,
31972, 7180, 31881, 7571, 31786, 7962, 31686, 8351, 31581, 8740, 31471, 9127, 31357, 9512, 31238, 9896, 31114, 10279,
30986, 10660, 30853, 11039, 30715, 11417, 30572, 11793, 30425, 12167, 30274, 12540, 30118, 12910, 29957, 13279, 29792, 13646,
29622, 14010, 29448, 14373, 29269, 14733, 29086, 15091, 28899, 15447, 28707, 15800, 28511, 16151, 28311, 16500, 28106, 16846,
27897, 17190, 27684, 17531, 27467, 17869, 27246, 18205, 27020, 18538, 26791, 18868, 26557, 19195, 26320, 19520, 26078, 19841,
25833, 20160, 25583, 20475, 25330, 20788, 25073, 21097, 24812, 21403, 24548, 21706, 24279, 22006, 24008, 22302, 23732, 22595,
23453, 22884, 23170, 23170, 22884, 23453, 22595, 23732, 22302, 24008, 22006, 24279, 21706, 24548, 21403, 24812, 21097, 25073,
20788, 25330, 20475, 25583, 20160, 25833, 19841, 26078, 19520, 26320, 19195, 26557, 18868, 26791, 18538, 27020, 18205, 27246,
17869, 27467, 17531, 27684, 17190, 27897, 16846, 28106, 16500, 28311, 16151, 28511, 15800, 28707, 15447, 28899, 15091, 29086,
14733, 29269, 14373, 29448, 14010, 29622, 13646, 29792, 13279, 29957, 12910, 30118, 12540, 30274, 12167, 30425, 11793, 30572,
11417, 30715, 11039, 30853, 10660, 30986, 10279, 31114, 9896, 31238, 9512, 31357, 9127, 31471, 8740, 31581, 8351, 31686,
7962, 31786, 7571, 31881, 7180, 31972, 6787, 32058, 6393, 32138, 5998, 32214, 5602, 32286, 5205, 32352, 4808, 32413,
4410, 32470, 4011, 32522, 3612, 32568, 3212, 32610, 2811, 32647, 2411, 32679, 2009, 32706, 1608, 32729, 1206, 32746,
804, 32758, 402, 32766};
static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32729, -1608,32706, -2009,32679, -2411,32647, -2811,32610, -3212,32568, -3612,32522, -4011,32470, -4410,32413, -4808,32352, -5205,32286, -5602,32214, -5998,32138, -6393,32058, -6787,31972, -7180,31881, -7571,31786, -7962,31686, -8351,31581, -8740,31471, -9127,31357, -9512,31238, -9896,31114, -10279,30986, -10660,30853, -11039,30715, -11417,30572, -11793,30425, -12167,30274, -12540,30118, -12910,29957, -13279,29792, -13646,29622, -14010,29448, -14373,29269, -14733,29086, -15091,28899, -15447,28707, -15800,28511, -16151,28311, -16500,28106, -16846,27897, -17190,27684, -17531,27467, -17869,27246, -18205,27020, -18538,26791, -18868,26557, -19195,26320, -19520,26078, -19841,25833, -20160,25583, -20475,25330, -20788,25073, -21097,24812, -21403,24548, -21706,24279, -22006,24008, -22302,23732, -22595,23453, -22884,23170, -23170,22884, -23453,22595, -23732,22302, -24008,22006, -24279,21706, -24548,21403, -24812,21097, -25073,20788, -25330,20475, -25583,20160, -25833,19841, -26078,19520, -26320,19195, -26557,18868, -26791,18538, -27020,18205, -27246,17869, -27467,17531, -27684,17190, -27897,16846, -28106,16500, -28311,16151, -28511,15800, -28707,15447, -28899,15091, -29086,14733, -29269,14373, -29448,14010, -29622,13646, -29792,13279, -29957,12910, -30118,12540, -30274,12167, -30425,11793, -30572,11417, -30715,11039, -30853,10660, -30986,10279, -31114,9896, -31238,9512, -31357,9127, -31471,8740, -31581,8351, -31686,7962, -31786,7571, -31881,7180, -31972,6787, -32058,6393, -32138,5998, -32214,5602, -32286,5205, -32352,4808, -32413,4410, -32470,4011, -32522,3612, -32568,3212, -32610,2811, -32647,2411, -32679,2009, -32706,1608, -32729,1206, -32746,804, -32758,402, -32766};
static const int16_t ru_90c[2 * 128] = {
32767, 0, 32766, -402, 32758, -804, 32746, -1206, 32729, -1608, 32706, -2009, 32679, -2411, 32647, -2811,
32610, -3212, 32568, -3612, 32522, -4011, 32470, -4410, 32413, -4808, 32352, -5205, 32286, -5602, 32214, -5998,
32138, -6393, 32058, -6787, 31972, -7180, 31881, -7571, 31786, -7962, 31686, -8351, 31581, -8740, 31471, -9127,
31357, -9512, 31238, -9896, 31114, -10279, 30986, -10660, 30853, -11039, 30715, -11417, 30572, -11793, 30425, -12167,
30274, -12540, 30118, -12910, 29957, -13279, 29792, -13646, 29622, -14010, 29448, -14373, 29269, -14733, 29086, -15091,
28899, -15447, 28707, -15800, 28511, -16151, 28311, -16500, 28106, -16846, 27897, -17190, 27684, -17531, 27467, -17869,
27246, -18205, 27020, -18538, 26791, -18868, 26557, -19195, 26320, -19520, 26078, -19841, 25833, -20160, 25583, -20475,
25330, -20788, 25073, -21097, 24812, -21403, 24548, -21706, 24279, -22006, 24008, -22302, 23732, -22595, 23453, -22884,
23170, -23170, 22884, -23453, 22595, -23732, 22302, -24008, 22006, -24279, 21706, -24548, 21403, -24812, 21097, -25073,
20788, -25330, 20475, -25583, 20160, -25833, 19841, -26078, 19520, -26320, 19195, -26557, 18868, -26791, 18538, -27020,
18205, -27246, 17869, -27467, 17531, -27684, 17190, -27897, 16846, -28106, 16500, -28311, 16151, -28511, 15800, -28707,
15447, -28899, 15091, -29086, 14733, -29269, 14373, -29448, 14010, -29622, 13646, -29792, 13279, -29957, 12910, -30118,
12540, -30274, 12167, -30425, 11793, -30572, 11417, -30715, 11039, -30853, 10660, -30986, 10279, -31114, 9896, -31238,
9512, -31357, 9127, -31471, 8740, -31581, 8351, -31686, 7962, -31786, 7571, -31881, 7180, -31972, 6787, -32058,
6393, -32138, 5998, -32214, 5602, -32286, 5205, -32352, 4808, -32413, 4410, -32470, 4011, -32522, 3612, -32568,
3212, -32610, 2811, -32647, 2411, -32679, 2009, -32706, 1608, -32729, 1206, -32746, 804, -32758, 402, -32766};
#define SCALE 0x3FFF
@@ -51,8 +82,8 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t harq_pid;
int16_t delta_phase = 0;
int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90;
const int16_t *ru1 = ru_90;
const int16_t *ru2 = ru_90;
int16_t current_phase1,current_phase2;
uint16_t aa,Msc_RS,Msc_RS_idx;
uint16_t *Msc_idx_ptr;
@@ -67,8 +98,8 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
uint32_t v=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[Ns+(subframe<<1)];
int symbol_offset,i;
//debug_msg("lte_ul_channel_estimation: cyclic shift %d\n",cyclicShift);
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377};
const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384};
#if defined(__x86_64__) || defined(__i386__)
__m128i *rxdataF128,*ul_ref128,*ul_ch128;
__m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
@@ -390,8 +421,8 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
int interpolate,
uint16_t rnti) {
int16_t delta_phase = 0;
int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90;
const int16_t *ru1 = ru_90;
const int16_t *ru2 = ru_90;
int16_t current_phase1,current_phase2;
uint16_t aa,Msc_RS,Msc_RS_idx;
uint16_t *Msc_idx_ptr;
@@ -403,8 +434,8 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
int symbol_offset,i;
//debug_msg("lte_ul_channel_estimation_RRU: cyclic shift %d\n",cyclicShift);
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377};
const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384};
#if defined(__x86_64__) || defined(__i386__)
__m128i *rxdataF128,*ul_ref128,*ul_ch128;
__m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;

View File

@@ -28,18 +28,52 @@
#include "PHY/defs_eNB.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_vars.h"
const uint16_t ref_primes[34] = {11, 23, 31, 47, 59, 71, 89, 107, 113, 139, 179, 191, 211, 239, 283, 293, 317, 359, 383, 431, 479, 523, 571, 599, 647, 719, 761, 863, 887, 953, 971, 1069, 1151, 1193};
static const uint16_t ref_primes[34] = {11, 23, 31, 47, 59, 71, 89, 107, 113, 139, 179, 191, 211, 239, 283, 293, 317,
359, 383, 431, 479, 523, 571, 599, 647, 719, 761, 863, 887, 953, 971, 1069, 1151, 1193};
int16_t *ul_ref_sigs[30][2][34];
int16_t *ul_ref_sigs_rx[30][2][34]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA
/* 36.211 table 5.5.1.2-1 */
char ref12[360] = {-1,1,3,-3,3,3,1,1,3,1,-3,3,1,1,3,3,3,-1,1,-3,-3,1,-3,3,1,1,-3,-3,-3,-1,-3,-3,1,-3,1,-1,-1,1,1,1,1,-1,-3,-3,1,-3,3,-1,-1,3,1,-1,1,-1,-3,-1,1,-1,1,3,1,-3,3,-1,-1,1,1,-1,-1,3,-3,1,-1,3,-3,-3,-3,3,1,-1,3,3,-3,1,-3,-1,-1,-1,1,-3,3,-1,1,-3,3,1,1,-3,3,1,-1,-1,-1,1,1,3,-1,1,1,-3,-1,3,3,-1,-3,1,1,1,1,1,-1,3,-1,1,1,-3,-3,-1,-3,-3,3,-1,3,1,-1,-1,3,3,-3,1,3,1,3,3,1,-3,1,1,-3,1,1,1,-3,-3,-3,1,3,3,-3,3,-3,1,1,3,-1,-3,3,3,-3,1,-1,-3,-1,3,1,3,3,3,-1,1,3,-1,1,-3,-1,-1,1,1,3,1,-1,-3,1,3,1,-1,1,3,3,3,-1,-1,3,-1,-3,1,1,3,-3,3,-3,-3,3,1,3,-1,-3,3,1,1,-3,1,-3,-3,-1,-1,1,-3,-1,3,1,3,1,-1,-1,3,-3,-1,-3,-1,-1,-3,1,1,1,1,3,1,-1,1,-3,-1,-1,3,-1,1,-3,-3,-3,-3,-3,1,-1,-3,1,1,-3,-3,-3,-3,-1,3,-3,1,-3,3,1,1,-1,-3,-1,-3,1,-1,1,3,-1,1,1,1,3,1,3,3,-1,1,-1,-3,-3,1,1,-3,3,3,1,3,3,1,-3,-1,-1,3,1,3,-3,-3,3,-3,1,-1,-1,3,-1,-3,-3,-1,-3,-1,-3,3,1,-1,1,3,-3,-3,-1,3,-3,3,-1,3,3,-3,3,3,-1,-1,3,-3,-3,-1,-1,-3,-1,3,-3,3,1,-1};
static const char ref12[360] = {
-1, 1, 3, -3, 3, 3, 1, 1, 3, 1, -3, 3, 1, 1, 3, 3, 3, -1, 1, -3, -3, 1, -3, 3, 1, 1, -3, -3, -3, -1,
-3, -3, 1, -3, 1, -1, -1, 1, 1, 1, 1, -1, -3, -3, 1, -3, 3, -1, -1, 3, 1, -1, 1, -1, -3, -1, 1, -1, 1, 3,
1, -3, 3, -1, -1, 1, 1, -1, -1, 3, -3, 1, -1, 3, -3, -3, -3, 3, 1, -1, 3, 3, -3, 1, -3, -1, -1, -1, 1, -3,
3, -1, 1, -3, 3, 1, 1, -3, 3, 1, -1, -1, -1, 1, 1, 3, -1, 1, 1, -3, -1, 3, 3, -1, -3, 1, 1, 1, 1, 1,
-1, 3, -1, 1, 1, -3, -3, -1, -3, -3, 3, -1, 3, 1, -1, -1, 3, 3, -3, 1, 3, 1, 3, 3, 1, -3, 1, 1, -3, 1,
1, 1, -3, -3, -3, 1, 3, 3, -3, 3, -3, 1, 1, 3, -1, -3, 3, 3, -3, 1, -1, -3, -1, 3, 1, 3, 3, 3, -1, 1,
3, -1, 1, -3, -1, -1, 1, 1, 3, 1, -1, -3, 1, 3, 1, -1, 1, 3, 3, 3, -1, -1, 3, -1, -3, 1, 1, 3, -3, 3,
-3, -3, 3, 1, 3, -1, -3, 3, 1, 1, -3, 1, -3, -3, -1, -1, 1, -3, -1, 3, 1, 3, 1, -1, -1, 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,-1,-1,3,1,-3,-3,-1,3,-3,-1,-3,-1,-3,-1,-1,-3,-1,-1,1,-3,-1,-1,1,-1,-3,1,1,-3,1,-3,-3,3,1,1,-1,3,-1,-1,1,1,-1,-1,-3,-1,3,-1,3,-1,1,3,1,-1,3,1,3,-3,-3,1,-1,-1,1,3
};
static const char ref24[720] = {
-1, 3, 1, -3, 3, -1, 1, 3, -3, 3, 1, 3, -3, 3, 1, 1, -1, 1, 3, -3, 3, -3, -1, -3, -3, 3, -3, -3, -3, 1, -3, -3,
3, -1, 1, 1, 1, 3, 1, -1, 3, -3, -3, 1, 3, 1, 1, -3, 3, -1, 3, 3, 1, 1, -3, 3, 3, 3, 3, 1, -1, 3, -1, 1,
1, -1, -3, -1, -1, 1, 3, 3, -1, -3, 1, 1, 3, -3, 1, 1, -3, -1, -1, 1, 3, 1, 3, 1, -1, 3, 1, 1, -3, -1, -3, -1,
-1, -1, -1, -3, -3, -1, 1, 1, 3, 3, -1, 3, -1, 1, -1, -3, 1, -1, -3, -3, 1, -3, -1, -1, -3, 1, 1, 3, -1, 1, 3, 1,
-3, 1, -3, 1, 1, -1, -1, 3, -1, -3, 3, -3, -3, -3, 1, 1, 1, 1, -1, -1, 3, -3, -3, 3, -3, 1, -1, -1, 1, -1, 1, 1,
-1, -3, -1, 1, -1, 3, -1, -3, -3, 3, 3, -1, -1, -3, -1, 3, 1, 3, 1, 3, 1, 1, -1, 3, 1, -1, 1, 3, -3, -1, -1, 1,
-3, 1, 3, -3, 1, -1, -3, 3, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, 1, -3, -3, -3, 1, -3, 1, 1, -3, 3, 3, -1, -3, -1,
3, -3, 3, 3, 3, -1, 1, 1, -3, 1, -1, 1, 1, -3, 1, 1, -1, 1, -3, -3, 3, -1, 3, -1, -1, -3, -3, -3, -1, -3, -3, 1,
-1, 1, 3, 3, -1, 1, -1, 3, 1, 3, 3, -3, -3, 1, 3, 1, -1, -3, -3, -3, 3, 3, -3, 3, 3, -1, -3, 3, -1, 1, -3, 1,
1, 3, 3, 1, 1, 1, -1, -1, 1, -3, 3, -1, 1, 1, -3, 3, 3, -1, -3, 3, -3, -1, -3, -1, 3, -1, -1, -1, -1, -3, -1, 3,
3, 1, -1, 1, 3, 3, 3, -1, 1, 1, -3, 1, 3, -1, -3, 3, -3, -3, 3, 1, 3, 1, -3, 3, 1, 3, 1, 1, 3, 3, -1, -1,
-3, 1, -3, -1, 3, 1, 1, 3, -1, -1, 1, -3, 1, 3, -3, 1, -1, -3, -1, 3, 1, 3, 1, -1, -3, -3, -1, -1, -3, -3, -3, -1,
-1, -3, 3, -1, -1, -1, -1, 1, 1, -3, 3, 1, 3, 3, 1, -1, 1, -3, 1, -3, 1, 1, -3, -1, 1, 3, -1, 3, 3, -1, -3, 1,
-1, -3, 3, 3, 3, -1, 1, 1, 3, -1, -3, -1, 3, -1, -1, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, 1, 1, 3, -3, 1, -3, -1,
1, 1, -3, -3, 3, 1, 1, -3, 1, 3, 3, 1, -1, -3, 3, -1, 3, 3, 3, -3, 1, -1, 1, -1, -3, -1, 1, 3, -1, 3, -3, -3,
-1, -3, 3, -3, -3, -3, -1, -1, -3, -1, -3, 3, 1, 3, -3, -1, 3, -1, 1, -1, 3, -3, 1, -1, -3, -3, 1, 1, -1, 1, -1, 1,
-1, 3, 1, -3, -1, 1, -1, 1, -1, -1, 3, 3, -3, -1, 1, -3, -3, -1, -3, 3, 1, -1, -3, -1, -3, -3, 3, -3, 3, -3, -1, 1,
3, 1, -3, 1, 3, 3, -1, -3, -1, -1, -1, -1, 3, 3, 3, 1, 3, 3, -3, 1, 3, -1, 3, -1, 3, 3, -3, 3, 1, -1, 3, 3,
1, -1, 3, 3, -1, -3, 3, -3, -1, -1, 3, -1, 3, -1, -1, 1, 1, 1, 1, -1, -1, -3, -1, 3, 1, -1, 1, -1, 3, -1, 3, 1,
1, -1, -1, -3, 1, 1, -3, 1, 3, -3, 1, 1, -3, -3, -1, -1, -3, -1, 1, 3, 1, 1, -3, -1, -1, -3, 3, -3, 3, 1, -3, 3,
-3, 1, -1, 1, -3, 1, 1, 1, -1, -3, 3, 3, 1, 1, 3, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -3, -1, -3, -1, -3, -1,
-1, -3, -1, -1, 1, -3, -1, -1, 1, -1, -3, 1, 1, -3, 1, -3, -3, 3, 1, 1, -1, 3, -1, -1, 1, 1, -1, -1, -3, -1, 3, -1,
3, -1, 1, 3, 1, -1, 3, 1, 3, -3, -3, 1, -1, -1, 1, 3};
void generate_ul_ref_sigs(void) {
double qbar,phase;

View File

@@ -40,8 +40,7 @@
#include "transport_common_proto.h"
#include "SCHED/sched_common.h"
//#define DEBUG_HARQ
#include "openair1/PHY/LTE_TRANSPORT/dci_tools_common_extern.h"
//#define DEBUG_DCI
@@ -98,69 +97,7 @@ uint16_t RIV2nb_rb_LUT100[6000];
uint16_t RIV2first_rb_LUT100[6000];
uint16_t RIV_max100=0;
extern uint32_t current_dlsch_cqi;
// Table 8.6.3-3 36.213
uint16_t beta_cqi[16] = {0, //reserved
0, //reserved
9, //1.125
10, //1.250
11, //1.375
13, //1.625
14, //1.750
16, //2.000
18, //2.250
20, //2.500
23, //2.875
25, //3.125
28, //3.500
32, //4.000
40, //5.000
50
}; //6.250
// Table 8.6.3-2 36.213
uint16_t beta_ri[16] = {10, //1.250
13, //1.625
16, //2.000
20, //2.500
25, //3.125
32, //4.000
40, //5.000
50, //6.250
64, //8.000
80, //10.000
101, //12.625
127, //15.875
160, //20.000
0, //reserved
0, //reserved
0
}; //reserved
// Table 8.6.3-2 36.213
uint16_t beta_ack[16] = {16, //2.000
20, //2.500
25, //3.125
32, //4.000
40, //5.000
50, //6.250
64, //8.000
80, //10.000
101, //12.625
127, //15.875
160, //20.000
248, //31.000
400, //50.000
640, //80.000
808
};//126.00
int8_t delta_PUSCH_abs[4] = {-4,-1,1,4};
int8_t delta_PUSCH_acc[4] = {-1,0,1,3};
int8_t *delta_PUCCH_lut = delta_PUSCH_acc;
const int8_t *delta_PUCCH_lut = delta_PUSCH_acc;
uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi)
{

View File

@@ -84,6 +84,6 @@ extern uint16_t RIV2nb_rb_LUT100[6000];
extern uint16_t RIV2first_rb_LUT100[6000];
extern uint16_t RIV_max100;
extern int8_t *delta_PUCCH_lut;
extern int8_t delta_PUSCH_acc[4];
extern int8_t delta_PUSCH_abs[4];
extern const int8_t *delta_PUCCH_lut;
extern const int8_t delta_PUSCH_acc[4];
extern const int8_t delta_PUSCH_abs[4];

View File

@@ -131,8 +131,8 @@ void layer1prec2A(int32_t *antenna0_sample, int32_t *antenna1_sample, uint8_t pr
((int16_t *)antenna1_sample)[1] = (int16_t)((((int16_t *)antenna1_sample)[1]*ONE_OVER_SQRT2_Q15)>>15); */
}
uint32_t FOUR[2]={0,4};
uint32_t TWO[2]={0,2};
static const uint32_t FOUR[2] = {0, 4};
static const uint32_t TWO[2] = {0, 2};
int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
int **txdataF,

View File

@@ -44,11 +44,6 @@
//unsigned short phich_reg[MAX_NUM_PHICH_GROUPS][3];
int32_t alam_bpsk_perm1[4] = {2,1,4,3}; // -conj(x) 1 (-1-j) -> 2 (1-j), 2->1, 3 (-1+j) -> (4) 1+j, 4->3
int32_t alam_bpsk_perm2[4] = {3,4,2,1}; // conj(x) 1 (-1-j) -> 3 (-1+j), 3->1, 2 (1-j) -> 4 (1+j), 4->2
// This routine generates the PHICH
void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,

View File

@@ -28,10 +28,10 @@ double ratioPB[2][4]={{ 1.0,4.0/5.0,3.0/5.0,2.0/5.0},
{ 5.0/4.0,1.0,3.0/4.0,1.0/2.0}};
*/
double ratioPB[2][4]={{ 0.00000, -0.96910, -2.21849, -3.97940}, //in db
{ 0.96910, 0.00000, -1.24939, -3.01030}};
static const double ratioPB[2][4] = {{0.00000, -0.96910, -2.21849, -3.97940}, // in db
{0.96910, 0.00000, -1.24939, -3.01030}};
double pa_values[8]={-6.0,-4.77,-3.0,-1.77,0.0,1.0,2.0,3.0}; //reported by higher layers
static const double pa_values[8] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; // reported by higher layers
double get_pa_dB(uint8_t pa)
{

View File

@@ -36,9 +36,9 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/lte/prach_utils.h"
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
uint16_t NCS_4[7] = {2,4,6,8,10,12,15};
const uint16_t NCS_unrestricted[16] = {0, 13, 15, 18, 22, 26, 32, 38, 46, 59, 76, 93, 119, 167, 279, 419};
const uint16_t NCS_restricted[15] = {15, 18, 22, 26, 32, 38, 46, 55, 68, 82, 100, 128, 158, 202, 237}; // high-speed case
const uint16_t NCS_4[7] = {2, 4, 6, 8, 10, 12, 15};
int16_t ru[2*839]; // quantized roots of unity
uint32_t ZC_inv[839]; // multiplicative inverse for roots u
@@ -259,66 +259,41 @@ PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = {
*/
uint16_t prach_root_sequence_map0_3[838] = { 129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84, 755, 105, 734, 93, 746, 70, 769, 60, 779,
2, 837, 1, 838,
56, 783, 112, 727, 148, 691,
80, 759, 42, 797, 40, 799,
35, 804, 73, 766, 146, 693,
31, 808, 28, 811, 30, 809, 27, 812, 29, 810,
24, 815, 48, 791, 68, 771, 74, 765, 178, 661, 136, 703,
86, 753, 78, 761, 43, 796, 39, 800, 20, 819, 21, 818,
95, 744, 202, 637, 190, 649, 181, 658, 137, 702, 125, 714, 151, 688,
217, 622, 128, 711, 142, 697, 122, 717, 203, 636, 118, 721, 110, 729, 89, 750, 103, 736, 61,
778, 55, 784, 15, 824, 14, 825,
12, 827, 23, 816, 34, 805, 37, 802, 46, 793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616,
228, 611, 227, 612, 132, 707, 133, 706, 143, 696, 135, 704, 161, 678, 201, 638, 173, 666, 106,
733, 83, 756, 91, 748, 66, 773, 53, 786, 10, 829, 9, 830,
7, 832, 8, 831, 16, 823, 47, 792, 64, 775, 57, 782, 104, 735, 101, 738, 108, 731, 208, 631, 184,
655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690, 216, 623, 218, 621,
152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720, 158, 681, 164,
675, 174, 665, 171, 668, 170, 669, 87, 752, 169, 670, 88, 751, 107, 732, 81, 758, 82, 757, 100,
739, 98, 741, 71, 768, 59, 780, 65, 774, 50, 789, 49, 790, 26, 813, 17, 822, 13, 826, 6, 833,
5, 834, 33, 806, 51, 788, 75, 764, 99, 740, 96, 743, 97, 742, 166, 673, 172, 667, 175, 664, 187,
652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645, 195, 644, 192, 647,
182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627, 153, 686, 213,
626, 215, 624, 150, 689,
225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692, 124, 715, 193, 646, 205, 634, 206,
633, 116, 723, 160, 679, 186, 653, 167, 672, 79, 760, 85, 754, 77, 762, 92, 747, 58, 781, 62,
777, 69, 770, 54, 785, 36, 803, 32, 807, 25, 814, 18, 821, 11, 828, 4, 835,
3, 836, 19, 820, 22, 817, 41, 798, 38, 801, 44, 795, 52, 787, 45, 794, 63, 776, 67, 772, 72,
767, 76, 763, 94, 745, 102, 737, 90, 749, 109, 730, 165, 674, 111, 728, 209, 630, 204, 635, 117,
722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662, 196, 643, 155, 684,
214, 625, 126, 713, 131, 708, 219, 620, 222, 617, 226, 613,
230, 609, 232, 607, 262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395,
444, 283, 556, 285, 554, 379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478,
387, 452, 360, 479, 310, 529, 354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324,
515,
323, 516, 320, 519, 334, 505, 359, 480, 295, 544, 385, 454, 292, 547, 291, 548, 381, 458, 399,
440, 380, 459, 397, 442, 369, 470, 377, 462, 410, 429, 407, 432, 281, 558, 414, 425, 247, 592,
277, 562, 271, 568, 272, 567, 264, 575, 259, 580,
237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250, 589, 246, 593, 417, 422, 248,
591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541,
312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319,
520, 332, 507, 333, 506, 348, 491, 347, 492, 322, 517,
330, 509, 338, 501, 341, 498, 340, 499, 342, 497, 301, 538, 366, 473, 401, 438, 371, 468, 408,
431, 375, 464, 249, 590, 269, 570, 238, 601, 234, 605,
257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372, 467, 282, 557, 403,
436, 396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495,
345, 494, 318, 521, 331, 508, 325, 514, 321, 518,
346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439, 378, 461, 374, 465, 415, 424, 270,
569, 241, 598,
231, 608, 260, 579, 268, 571, 276, 563, 409, 430, 398, 441, 290, 549, 304, 535, 308, 531, 358,
481, 316, 523,
293, 546, 288, 551, 284, 555, 368, 471, 253, 586, 256, 583, 263, 576,
242, 597, 274, 565, 402, 437, 383, 456, 357, 482, 329, 510,
317, 522, 307, 532, 286, 553, 287, 552, 266, 573, 261, 578,
236, 603, 303, 536, 356, 483,
355, 484, 405, 434, 404, 435, 406, 433,
235, 604, 267, 572, 302, 537,
309, 530, 265, 574, 233, 606,
367, 472, 296, 543,
336, 503, 305, 534, 373, 466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610
};
const uint16_t prach_root_sequence_map0_3[838] = {
129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84, 755, 105, 734, 93, 746, 70, 769, 60, 779, 2, 837, 1, 838, 56,
783, 112, 727, 148, 691, 80, 759, 42, 797, 40, 799, 35, 804, 73, 766, 146, 693, 31, 808, 28, 811, 30, 809, 27, 812,
29, 810, 24, 815, 48, 791, 68, 771, 74, 765, 178, 661, 136, 703, 86, 753, 78, 761, 43, 796, 39, 800, 20, 819, 21,
818, 95, 744, 202, 637, 190, 649, 181, 658, 137, 702, 125, 714, 151, 688, 217, 622, 128, 711, 142, 697, 122, 717, 203, 636,
118, 721, 110, 729, 89, 750, 103, 736, 61, 778, 55, 784, 15, 824, 14, 825, 12, 827, 23, 816, 34, 805, 37, 802, 46,
793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616, 228, 611, 227, 612, 132, 707, 133, 706, 143, 696, 135, 704, 161, 678,
201, 638, 173, 666, 106, 733, 83, 756, 91, 748, 66, 773, 53, 786, 10, 829, 9, 830, 7, 832, 8, 831, 16, 823, 47,
792, 64, 775, 57, 782, 104, 735, 101, 738, 108, 731, 208, 631, 184, 655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690,
216, 623, 218, 621, 152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720, 158, 681, 164, 675, 174,
665, 171, 668, 170, 669, 87, 752, 169, 670, 88, 751, 107, 732, 81, 758, 82, 757, 100, 739, 98, 741, 71, 768, 59, 780,
65, 774, 50, 789, 49, 790, 26, 813, 17, 822, 13, 826, 6, 833, 5, 834, 33, 806, 51, 788, 75, 764, 99, 740, 96,
743, 97, 742, 166, 673, 172, 667, 175, 664, 187, 652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645,
195, 644, 192, 647, 182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627, 153, 686, 213, 626, 215,
624, 150, 689, 225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692, 124, 715, 193, 646, 205, 634, 206, 633, 116, 723,
160, 679, 186, 653, 167, 672, 79, 760, 85, 754, 77, 762, 92, 747, 58, 781, 62, 777, 69, 770, 54, 785, 36, 803, 32,
807, 25, 814, 18, 821, 11, 828, 4, 835, 3, 836, 19, 820, 22, 817, 41, 798, 38, 801, 44, 795, 52, 787, 45, 794,
63, 776, 67, 772, 72, 767, 76, 763, 94, 745, 102, 737, 90, 749, 109, 730, 165, 674, 111, 728, 209, 630, 204, 635, 117,
722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662, 196, 643, 155, 684, 214, 625, 126, 713, 131, 708,
219, 620, 222, 617, 226, 613, 230, 609, 232, 607, 262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395,
444, 283, 556, 285, 554, 379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478, 387, 452, 360, 479, 310, 529,
354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324, 515, 323, 516, 320, 519, 334, 505, 359, 480, 295, 544, 385,
454, 292, 547, 291, 548, 381, 458, 399, 440, 380, 459, 397, 442, 369, 470, 377, 462, 410, 429, 407, 432, 281, 558, 414, 425,
247, 592, 277, 562, 271, 568, 272, 567, 264, 575, 259, 580, 237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250,
589, 246, 593, 417, 422, 248, 591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541,
312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319, 520, 332, 507, 333, 506, 348,
491, 347, 492, 322, 517, 330, 509, 338, 501, 341, 498, 340, 499, 342, 497, 301, 538, 366, 473, 401, 438, 371, 468, 408, 431,
375, 464, 249, 590, 269, 570, 238, 601, 234, 605, 257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372,
467, 282, 557, 403, 436, 396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495, 345, 494,
318, 521, 331, 508, 325, 514, 321, 518, 346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439, 378, 461, 374, 465, 415,
424, 270, 569, 241, 598, 231, 608, 260, 579, 268, 571, 276, 563, 409, 430, 398, 441, 290, 549, 304, 535, 308, 531, 358, 481,
316, 523, 293, 546, 288, 551, 284, 555, 368, 471, 253, 586, 256, 583, 263, 576, 242, 597, 274, 565, 402, 437, 383, 456, 357,
482, 329, 510, 317, 522, 307, 532, 286, 553, 287, 552, 266, 573, 261, 578, 236, 603, 303, 536, 356, 483, 355, 484, 405, 434,
404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543, 336, 503, 305, 534, 373,
466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610};
uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,7,132,8,131,9,130,10,129,
11,128,12,127,13,126,14,125,15,124,16,123,17,122,18,121,19,120,20,119,
@@ -350,7 +325,7 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
void fill_du(uint8_t prach_fmt) {
uint16_t iu,u,p;
uint16_t N_ZC;
uint16_t *prach_root_sequence_map;
const uint16_t *prach_root_sequence_map;
if (prach_fmt<4) {
N_ZC = 839;
@@ -405,7 +380,7 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
unsigned int k,inv_u,i,NCS=0,num_preambles;
int N_ZC;
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
uint16_t *prach_root_sequence_map;
const uint16_t *prach_root_sequence_map;
uint16_t u, preamble_offset;
uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift;
uint8_t not_found;

View File

@@ -40,9 +40,9 @@
//#define PRACH_DEBUG 1
//#define PRACH_WRITE_OUTPUT_DEBUG 1
extern uint16_t NCS_unrestricted[16];
extern uint16_t NCS_restricted[15];
extern uint16_t NCS_4[7];
extern const uint16_t NCS_unrestricted[16];
extern const uint16_t NCS_restricted[15];
extern const uint16_t NCS_4[7];
extern int16_t ru[2*839]; // quantized roots of unity
extern uint32_t ZC_inv[839]; // multiplicative inverse for roots u

View File

@@ -44,26 +44,20 @@
#include "pucch_extern.h"
int16_t cfo_pucch_np[24*7] = {20787,-25330,27244,-18205,31356,-9512,32767,0,31356,9511,27244,18204,20787,25329,
27244,-18205,30272,-12540,32137,-6393,32767,0,32137,6392,30272,12539,27244,18204,
31356,-9512,32137,-6393,32609,-3212,32767,0,32609,3211,32137,6392,31356,9511,
32767,0,32767,0,32767,0,32767,0,32767,0,32767,0,32767,0,
31356,9511,32137,6392,32609,3211,32767,0,32609,-3212,32137,-6393,31356,-9512,
27244,18204,30272,12539,32137,6392,32767,0,32137,-6393,30272,-12540,27244,-18205,
20787,25329,27244,18204,31356,9511,32767,0,31356,-9512,27244,-18205,20787,-25330
};
int16_t cfo_pucch_ep[24*6] = {24278,-22005,29621,-14010,32412,-4808,32412,4807,29621,14009,24278,22004,
28897,-15447,31356,-9512,32609,-3212,32609,3211,31356,9511,28897,15446,
31785,-7962,32412,-4808,32727,-1608,32727,1607,32412,4807,31785,7961,
32767,0,32767,0,32767,0,32767,0,32767,0,32767,0,
31785,7961,32412,4807,32727,1607,32727,-1608,32412,-4808,31785,-7962,
28897,15446,31356,9511,32609,3211,32609,-3212,31356,-9512,28897,-15447,
24278,22004,29621,14009,32412,4807,32412,-4808,29621,-14010,24278,-22005
};
static const int16_t cfo_pucch_np[24 * 7] = {
20787, -25330, 27244, -18205, 31356, -9512, 32767, 0, 31356, 9511, 27244, 18204, 20787, 25329, 27244, -18205, 30272,
-12540, 32137, -6393, 32767, 0, 32137, 6392, 30272, 12539, 27244, 18204, 31356, -9512, 32137, -6393, 32609, -3212,
32767, 0, 32609, 3211, 32137, 6392, 31356, 9511, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767,
0, 32767, 0, 32767, 0, 31356, 9511, 32137, 6392, 32609, 3211, 32767, 0, 32609, -3212, 32137, -6393,
31356, -9512, 27244, 18204, 30272, 12539, 32137, 6392, 32767, 0, 32137, -6393, 30272, -12540, 27244, -18205, 20787,
25329, 27244, 18204, 31356, 9511, 32767, 0, 31356, -9512, 27244, -18205, 20787, -25330};
static const int16_t cfo_pucch_ep[24 * 6] = {
24278, -22005, 29621, -14010, 32412, -4808, 32412, 4807, 29621, 14009, 24278, 22004, 28897, -15447, 31356, -9512, 32609,
-3212, 32609, 3211, 31356, 9511, 28897, 15446, 31785, -7962, 32412, -4808, 32727, -1608, 32727, 1607, 32412, 4807,
31785, 7961, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 31785, 7961, 32412,
4807, 32727, 1607, 32727, -1608, 32412, -4808, 31785, -7962, 28897, 15446, 31356, 9511, 32609, 3211, 32609, -3212,
31356, -9512, 28897, -15447, 24278, 22004, 29621, 14009, 32412, 4807, 32412, -4808, 29621, -14010, 24278, -22005};
void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) {
@@ -194,10 +188,10 @@ uint16_t pucchfmt3_Baseseq_csh_remove( int16_t SubCarrierDeMapData[4][14][12][2]
}
#define MAXROW_TBL_SF5_OS_IDX (5) // Orthogonal sequence index
const int16_t TBL_3_SF5_GEN_N_DASH_NS[MAXROW_TBL_SF5_OS_IDX] = {0,3,6,8,10};
static const int16_t TBL_3_SF5_GEN_N_DASH_NS[MAXROW_TBL_SF5_OS_IDX] = {0, 3, 6, 8, 10};
#define MAXROW_TBL_SF4_OS_IDX (4) // Orthogonal sequence index
const int16_t TBL_3_SF4_GEN_N_DASH_NS[MAXROW_TBL_SF4_OS_IDX] = {0,3,6,9};
static const int16_t TBL_3_SF4_GEN_N_DASH_NS[MAXROW_TBL_SF4_OS_IDX] = {0, 3, 6, 9};
/* Channel estimation */
uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[4][14][12][2],
@@ -532,12 +526,10 @@ const int16_t TBL_3_SF5[MAXROW_TBL_SF5][MAXCLM_TBL_SF5][2] = {
#define MAXROW_TBL_SF4_fmt3 4
#define MAXCLM_TBL_SF4 4
const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = {
{ {32767,0}, {32767,0}, {32767,0}, {32767,0}},
{ {32767,0}, {-32767,0}, {32767,0}, {-32767,0}},
{ {32767,0}, {32767,0}, {-32767,0}, {-32767,0}},
{ {32767,0}, {-32767,0}, {-32767,0}, {32767,0}}
};
static const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = {{{32767, 0}, {32767, 0}, {32767, 0}, {32767, 0}},
{{32767, 0}, {-32767, 0}, {32767, 0}, {-32767, 0}},
{{32767, 0}, {32767, 0}, {-32767, 0}, {-32767, 0}},
{{32767, 0}, {-32767, 0}, {-32767, 0}, {32767, 0}}};
/* orthogonal sequence remove */
uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[4][2][5][12][2],
@@ -918,7 +910,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int16_t tmp_re,tmp_im,W_re=0,W_im=0;
int16_t *rxptr;
uint32_t symbol_offset;
int16_t stat0_ref_re[4],stat0_ref_im[4],stat1_ref_re[4],stat1_ref_im[4],*cfo;
int16_t stat0_ref_re[4], stat0_ref_im[4], stat1_ref_re[4], stat1_ref_im[4];
int16_t chest0_re[4][12],chest0_im[4][12];
int16_t chest1_re[4][12],chest1_im[4][12];
int32_t chest_mag;
@@ -1214,7 +1206,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat1_re[aa]=0;
stat1_im[aa]=0;
off=re<<1;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
const int16_t *cfo = (frame_parms->Ncp == 0) ? &cfo_pucch_np[14 * phase] : &cfo_pucch_ep[12 * phase];
for (l=0; l<(nsymb>>1); l++) {
stat0_re[aa] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb;
@@ -1318,7 +1310,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat0_ref_re[aa]=0;
stat0_ref_im[aa]=0;
off=re<<1;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
const int16_t *cfo = (frame_parms->Ncp == 0) ? &cfo_pucch_np[14 * phase] : &cfo_pucch_ep[12 * phase];
for (l=0; l<(nsymb>>1); l++) {
if ((l<2)||(l>(nsymb>>1) - 3)) { //data symbols
@@ -1398,7 +1390,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
if (sigma2_dB<(dB_fixed(stat_max) - (IS_SOFTMODEM_IQPLAYER?0:pucch1_thres)) ) {//
chL = (nsymb>>1)-4;
chest_mag=0;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max];
const int16_t *cfo = (frame_parms->Ncp == 0) ? &cfo_pucch_np[14 * phase_max] : &cfo_pucch_ep[12 * phase_max];
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
for (re=0; re<12; re++) {

View File

@@ -72,197 +72,300 @@ void init_ncs_cell(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7])
}
}
int16_t W4[3][4] = {{32767, 32767, 32767, 32767},
{32767,-32768, 32767,-32768},
{32767,-32768,-32768, 32767}
};
int16_t W3_re[3][6] = {{32767, 32767, 32767},
{32767,-16384,-16384},
{32767,-16384,-16384}
};
const int16_t W4[3][4] = {{32767, 32767, 32767, 32767}, {32767, -32768, 32767, -32768}, {32767, -32768, -32768, 32767}};
const int16_t W3_re[3][6] = {{32767, 32767, 32767}, {32767, -16384, -16384}, {32767, -16384, -16384}};
int16_t W3_im[3][6] = {{0 ,0 ,0 },
{0 , 28377,-28378},
{0 ,-28378, 28377}
};
const int16_t W3_im[3][6] = {{0, 0, 0}, {0, 28377, -28378}, {0, -28378, 28377}};
char *pucch_format_string[] = {
"format 1",
"format 1a",
"format 1b",
"pucch_format1b_csA2",
"pucch_format1b_csA3",
"pucch_format1b_csA4",
"format 2",
"format 2a",
"format 2b",
"pucch_format3"
};
const uint8_t chcod_tbl[128][48] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1,
1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1},
{0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0,
0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 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 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1},
{0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1},
{1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0},
{1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0},
{0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1} };
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377};
const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384};
// W5_TBL
int16_t W5_fmt3_re[5][5] = { {32767, 32767, 32767, 32767, 32767},
{32767, 10125, -26509, -26509, 10125},
{32767, -26509, 10125, 10125, -26509},
{32767, -26509, 10125, 10125, -26509},
{32767, 10125, -26509, -26509, 10125} };
const int16_t W5_fmt3_re[5][5] = {{32767, 32767, 32767, 32767, 32767},
{32767, 10125, -26509, -26509, 10125},
{32767, -26509, 10125, 10125, -26509},
{32767, -26509, 10125, 10125, -26509},
{32767, 10125, -26509, -26509, 10125}};
int16_t W5_fmt3_im[5][5] = { {0, 0, 0, 0, 0},
{0, 31163, 19259, -19259, -31163},
{0, 19259, -31163, 31163, -19259},
{0, -19259, 31163, -31163, 19259},
{0, -31163, -19259, 19259, 31163} };
const int16_t W5_fmt3_im[5][5] = {{0, 0, 0, 0, 0},
{0, 31163, 19259, -19259, -31163},
{0, 19259, -31163, 31163, -19259},
{0, -19259, 31163, -31163, 19259},
{0, -31163, -19259, 19259, 31163}};
int16_t W4_fmt3[4][4] = { {32767, 32767, 32767, 32767},
{32767, -32767, 32767, -32767},
{32767, 32767, -32767, -32767},
{32767, -32767, -32767, 32767} };
const int16_t W4_fmt3[4][4] = {{32767, 32767, 32767, 32767},
{32767, -32767, 32767, -32767},
{32767, 32767, -32767, -32767},
{32767, -32767, -32767, 32767}};
// W2 TBL
int16_t W2[2] = {32767, 32767};
const int16_t W2[2] = {32767, 32767};
// e^j*pai*floor (ncs_cell(ns,l)/64)/2
int16_t RotTBL_re[4] = {32767, 0, -32767, 0};
int16_t RotTBL_im[4] = {0, 32767, 0, -32767};
const int16_t RotTBL_re[4] = {32767, 0, -32767, 0};
const int16_t RotTBL_im[4] = {0, 32767, 0, -32767};
//np4_tbl, np5_tbl
uint8_t Np5_TBL[5] = {0, 3, 6, 8, 10};
uint8_t Np4_TBL[4] = {0, 3, 6, 9};
const uint8_t Np5_TBL[5] = {0, 3, 6, 8, 10};
const uint8_t Np4_TBL[4] = {0, 3, 6, 9};
// alpha_TBL
int16_t alphaTBL_re[12] = {32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383, 0, 16383, 28377};
int16_t alphaTBL_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383};
const int16_t alphaTBL_re[12] = {32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383, 0, 16383, 28377};
const int16_t alphaTBL_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383};

View File

@@ -47,37 +47,45 @@
#define D_NPUCCH_SF5 5
#define D_NPUCCH_SF4 4
extern int16_t W4[3][4];
extern const int16_t W4[3][4];
extern int16_t W3_re[3][6];
extern const int16_t W3_re[3][6];
extern const int16_t W3_im[3][6];
extern int16_t W3_im[3][6];
extern const int16_t alpha_re[12];
extern const int16_t alpha_im[12];
extern int16_t alpha_re[12];
extern int16_t alpha_im[12];
static char const* const pucch_format_string[] = {"format 1",
"format 1a",
"format 1b",
"pucch_format1b_csA2",
"pucch_format1b_csA3",
"pucch_format1b_csA4",
"format 2",
"format 2a",
"format 2b",
"pucch_format3"};
extern char *pucch_format_string[];
extern const uint8_t chcod_tbl[128][48];
extern uint8_t chcod_tbl[128][48];
extern const int16_t W5_fmt3_re[5][5];
extern int16_t W5_fmt3_re[5][5];
extern const int16_t W5_fmt3_im[5][5];
extern int16_t W5_fmt3_im[5][5];
extern const int16_t W4_fmt3[4][4];
extern int16_t W4_fmt3[4][4];
extern const int16_t W2[2];
extern int16_t W2[2];
extern int16_t RotTBL_re[4];
extern int16_t RotTBL_im[4];
extern const int16_t RotTBL_re[4];
extern const int16_t RotTBL_im[4];
//np4_tbl, np5_tbl
extern uint8_t Np5_TBL[5];
extern uint8_t Np4_TBL[4];
extern const uint8_t Np5_TBL[5];
extern const uint8_t Np4_TBL[4];
// alpha_TBL
extern int16_t alphaTBL_re[12];
extern int16_t alphaTBL_im[12];
extern const int16_t alphaTBL_re[12];
extern const int16_t alphaTBL_im[12];
#endif

View File

@@ -32,6 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "SCHED_UE/sched_UE.h"
#ifdef DEBUG_DCI_TOOLS
#include "PHY/phy_vars.h"
@@ -63,10 +64,6 @@
int flag_LA=0;
extern uint16_t beta_cqi[16];
extern uint16_t beta_ri[16];
extern uint16_t beta_ack[16];
static const double p_qpsk[8] = {5982.42405670359,
-21568.1135917693,
31293.9987036905,

View File

@@ -33,51 +33,31 @@
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
static unsigned short msrsb_6_40[8][4] = {
{36, 12, 4, 4},
{32, 16, 8, 4},
{24, 4, 4, 4},
{20, 4, 4, 4},
{16, 4, 4, 4},
{12, 4, 4, 4},
{8, 4, 4, 4},
{4, 4, 4, 4}
};
static const unsigned short msrsb_6_40[8][4] =
{{36, 12, 4, 4}, {32, 16, 8, 4}, {24, 4, 4, 4}, {20, 4, 4, 4}, {16, 4, 4, 4}, {12, 4, 4, 4}, {8, 4, 4, 4}, {4, 4, 4, 4}};
static unsigned short msrsb_41_60[8][4] = {
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4}
};
static const unsigned short msrsb_41_60[8][4] =
{{48, 24, 12, 4}, {48, 16, 8, 4}, {40, 20, 4, 4}, {36, 12, 4, 4}, {32, 16, 8, 4}, {24, 4, 4, 4}, {20, 4, 4, 4}, {16, 4, 4, 4}};
static unsigned short msrsb_61_80[8][4] = {
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4}
};
static const unsigned short msrsb_61_80[8][4] = {{72, 24, 12, 4},
{64, 32, 16, 4},
{60, 20, 4, 4},
{48, 24, 12, 4},
{48, 16, 8, 4},
{40, 20, 4, 4},
{36, 12, 4, 4},
{32, 16, 8, 4}};
static unsigned short msrsb_81_110[8][4] = {
{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4}
};
static const unsigned short msrsb_81_110[8][4] = {{96, 48, 24, 4},
{96, 32, 16, 4},
{80, 40, 20, 4},
{72, 24, 12, 4},
{64, 32, 16, 4},
{60, 20, 4, 4},
{48, 24, 12, 4},
{48, 16, 8, 4}};
unsigned short transmission_offset_tdd[16] = {2,6,10,18,14,22,26,30,70,74,194,326,586,210};
// static const unsigned short transmission_offset_tdd[16] = {2,6,10,18,14,22,26,30,70,74,194,326,586,210};
int compareints (const void * a, const void * b)
{

View File

@@ -51,7 +51,7 @@ void PHY_ofdm_mod(int *input,
void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms);
void nr_normal_prefix_mod(c16_t *txdataF, c16_t *txdata, uint8_t nsymb, NR_DL_FRAME_PARMS *frame_parms, uint32_t slot);
void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
void do_OFDM_mod(c16_t **txdataF, c16_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
/** @}*/

View File

@@ -23,98 +23,90 @@
#include "PHY/NR_REFSIG/nr_mod_table.h"
//Table 6.3.1.5-1 Precoding Matrix W 1 layer 2 antenna ports 'n' = -1 and 'o' = -j
char nr_W_1l_2p[6][2][1] = {
{{'1'}, {'0'}},//pmi 0
{{'0'}, {'1'}},
{{'1'}, {'1'}},
{{'1'}, {'n'}},
{{'1'}, {'j'}},
{{'1'}, {'o'}}//pmi 5
const char nr_W_1l_2p[6][2][1] = {
{{'1'}, {'0'}}, // pmi 0
{{'0'}, {'1'}},
{{'1'}, {'1'}},
{{'1'}, {'n'}},
{{'1'}, {'j'}},
{{'1'}, {'o'}} // pmi 5
};
//Table 6.3.1.5-3 Precoding Matrix W 1 layer 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_1l_4p[28][4][1] = {
{{'1'}, {'0'}, {'0'}, {'0'}},//pmi 0
{{'0'}, {'1'}, {'0'}, {'0'}},
{{'0'}, {'0'}, {'1'}, {'0'}},
{{'0'}, {'0'}, {'0'}, {'1'}},
{{'1'}, {'0'}, {'1'}, {'0'}},
{{'1'}, {'0'}, {'n'}, {'0'}},
{{'1'}, {'0'}, {'j'}, {'0'}},
{{'1'}, {'0'}, {'o'}, {'0'}},//pmi 7
{{'0'}, {'1'}, {'0'}, {'1'}},//pmi 8
{{'0'}, {'1'}, {'0'}, {'n'}},
{{'0'}, {'1'}, {'0'}, {'j'}},
{{'0'}, {'1'}, {'0'}, {'o'}},
{{'1'}, {'1'}, {'1'}, {'1'}},
{{'1'}, {'1'}, {'j'}, {'j'}},
{{'1'}, {'1'}, {'n'}, {'n'}},
{{'1'}, {'1'}, {'o'}, {'o'}},
{{'1'}, {'j'}, {'1'}, {'j'}},//pmi 16
{{'1'}, {'j'}, {'j'}, {'n'}},
{{'1'}, {'j'}, {'n'}, {'o'}},
{{'1'}, {'j'}, {'o'}, {'1'}},
{{'1'}, {'n'}, {'1'}, {'n'}},
{{'1'}, {'n'}, {'j'}, {'o'}},
{{'1'}, {'n'}, {'n'}, {'1'}},
{{'1'}, {'n'}, {'o'}, {'j'}},//pmi 23
{{'1'}, {'o'}, {'1'}, {'o'}},//pmi 24
{{'1'}, {'o'}, {'j'}, {'1'}},
{{'1'}, {'o'}, {'n'}, {'j'}},
{{'1'}, {'o'}, {'o'}, {'n'}}//pmi 27
const char nr_W_1l_4p[28][4][1] = {
{{'1'}, {'0'}, {'0'}, {'0'}}, // pmi 0
{{'0'}, {'1'}, {'0'}, {'0'}},
{{'0'}, {'0'}, {'1'}, {'0'}},
{{'0'}, {'0'}, {'0'}, {'1'}},
{{'1'}, {'0'}, {'1'}, {'0'}},
{{'1'}, {'0'}, {'n'}, {'0'}},
{{'1'}, {'0'}, {'j'}, {'0'}},
{{'1'}, {'0'}, {'o'}, {'0'}}, // pmi 7
{{'0'}, {'1'}, {'0'}, {'1'}}, // pmi 8
{{'0'}, {'1'}, {'0'}, {'n'}},
{{'0'}, {'1'}, {'0'}, {'j'}},
{{'0'}, {'1'}, {'0'}, {'o'}},
{{'1'}, {'1'}, {'1'}, {'1'}},
{{'1'}, {'1'}, {'j'}, {'j'}},
{{'1'}, {'1'}, {'n'}, {'n'}},
{{'1'}, {'1'}, {'o'}, {'o'}},
{{'1'}, {'j'}, {'1'}, {'j'}}, // pmi
// 16
{{'1'}, {'j'}, {'j'}, {'n'}},
{{'1'}, {'j'}, {'n'}, {'o'}},
{{'1'}, {'j'}, {'o'}, {'1'}},
{{'1'}, {'n'}, {'1'}, {'n'}},
{{'1'}, {'n'}, {'j'}, {'o'}},
{{'1'}, {'n'}, {'n'}, {'1'}},
{{'1'}, {'n'}, {'o'}, {'j'}}, // pmi 23
{{'1'}, {'o'}, {'1'}, {'o'}}, // pmi 24
{{'1'}, {'o'}, {'j'}, {'1'}},
{{'1'}, {'o'}, {'n'}, {'j'}},
{{'1'}, {'o'}, {'o'}, {'n'}} // pmi 27
};
//Table 6.3.1.5-4 Precoding Matrix W 2 antenna ports layers 2 'n' = -1 and 'o' = -j
char nr_W_2l_2p[3][2][2] = {
{{'1', '0'}, {'0', '1'}},//pmi 0
{{'1', '1'}, {'1', 'n'}},
{{'1', '1'}, {'j', 'o'}} //pmi 2
const char nr_W_2l_2p[3][2][2] = {
{{'1', '0'}, {'0', '1'}}, // pmi 0
{{'1', '1'}, {'1', 'n'}},
{{'1', '1'}, {'j', 'o'}} // pmi 2
};
//Table 6.3.1.5-5 Precoding Matrix W 2 layers 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_2l_4p[22][4][2] = {
{{'1', '0'}, {'0', '1'}, {'0', '0'}, {'0', '0'}},//pmi 0
{{'1', '0'}, {'0', '0'}, {'0', '1'}, {'0', '0'}},
{{'1', '0'}, {'0', '0'}, {'0', '0'}, {'0', '1'}},
{{'0', '0'}, {'1', '0'}, {'0', '1'}, {'0', '0'}},//pmi 3
{{'0', '0'}, {'1', '0'}, {'0', '0'}, {'0', '1'}},//pmi 4
{{'0', '0'}, {'0', '0'}, {'1', '0'}, {'0', '1'}},
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'j'}},
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', '1'}},//pmi 8
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', 'n'}},
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'j'}},//pmi 11
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', '1'}},//pmi 12
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', 'n'}},
{{'1', '1'}, {'1', '1'}, {'1', 'n'}, {'1', 'n'}},
{{'1', '1'}, {'1', '1'}, {'j', 'o'}, {'j', 'o'}},//pmi 15
{{'1', '1'}, {'j', 'j'}, {'1', 'n'}, {'j', 'o'}},//pmi 16
{{'1', '1'}, {'j', 'j'}, {'j', 'o'}, {'n', '1'}},
{{'1', '1'}, {'n', 'n'}, {'1', 'n'}, {'n', '1'}},
{{'1', '1'}, {'n', 'n'}, {'j', 'o'}, {'o', 'j'}},//pmi 19
{{'1', '1'}, {'o', 'o'}, {'1', 'n'}, {'o', 'j'}},
{{'1', '1'}, {'o', 'o'}, {'j', 'o'}, {'1', 'n'}}//pmi 21
const char nr_W_2l_4p[22][4][2] = {
{{'1', '0'}, {'0', '1'}, {'0', '0'}, {'0', '0'}}, // pmi 0
{{'1', '0'}, {'0', '0'}, {'0', '1'}, {'0', '0'}}, {{'1', '0'}, {'0', '0'}, {'0', '0'}, {'0', '1'}},
{{'0', '0'}, {'1', '0'}, {'0', '1'}, {'0', '0'}}, // pmi 3
{{'0', '0'}, {'1', '0'}, {'0', '0'}, {'0', '1'}}, // pmi 4
{{'0', '0'}, {'0', '0'}, {'1', '0'}, {'0', '1'}}, {{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'j'}}, {{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', '1'}}, // pmi 8
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', 'n'}}, {{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'j'}}, // pmi 11
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', '1'}}, // pmi 12
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', 'n'}}, {{'1', '1'}, {'1', '1'}, {'1', 'n'}, {'1', 'n'}},
{{'1', '1'}, {'1', '1'}, {'j', 'o'}, {'j', 'o'}}, // pmi 15
{{'1', '1'}, {'j', 'j'}, {'1', 'n'}, {'j', 'o'}}, // pmi 16
{{'1', '1'}, {'j', 'j'}, {'j', 'o'}, {'n', '1'}}, {{'1', '1'}, {'n', 'n'}, {'1', 'n'}, {'n', '1'}},
{{'1', '1'}, {'n', 'n'}, {'j', 'o'}, {'o', 'j'}}, // pmi 19
{{'1', '1'}, {'o', 'o'}, {'1', 'n'}, {'o', 'j'}}, {{'1', '1'}, {'o', 'o'}, {'j', 'o'}, {'1', 'n'}} // pmi 21
};
//Table 6.3.1.5-6 Precoding Matrix W 3 layers 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_3l_4p[7][4][3] = {
{{'1', '0', '0'}, {'0', '1', '0'}, {'0', '0', '1'},{'0', '0', '0'}},//pmi 0
{{'1', '0', '0'}, {'0', '1', '0'}, {'1', '0', '0'},{'0', '0', '1'}},
{{'1', '0', '0'}, {'0', '1', '0'}, {'n', '0', '0'},{'0', '0', '1'}},
{{'1', '1', '1'}, {'1', 'n', '1'}, {'1', '1', 'n'},{'1', 'n', 'n'}},//pmi 3
{{'1', '1', '1'}, {'1', 'n', '1'}, {'j', 'j', 'o'},{'j', 'o', 'o'}},//pmi 4
{{'1', '1', '1'}, {'n', '1', 'n'}, {'1', '1', 'n'},{'n', '1', '1'}},
{{'1', '1', '1'}, {'n', '1', 'n'}, {'j', 'j', 'o'},{'o', 'j', 'j'}}
};
const char nr_W_3l_4p[7][4][3] = {{{'1', '0', '0'}, {'0', '1', '0'}, {'0', '0', '1'}, {'0', '0', '0'}}, // pmi 0
{{'1', '0', '0'}, {'0', '1', '0'}, {'1', '0', '0'}, {'0', '0', '1'}},
{{'1', '0', '0'}, {'0', '1', '0'}, {'n', '0', '0'}, {'0', '0', '1'}},
{{'1', '1', '1'}, {'1', 'n', '1'}, {'1', '1', 'n'}, {'1', 'n', 'n'}}, // pmi 3
{{'1', '1', '1'}, {'1', 'n', '1'}, {'j', 'j', 'o'}, {'j', 'o', 'o'}}, // pmi 4
{{'1', '1', '1'}, {'n', '1', 'n'}, {'1', '1', 'n'}, {'n', '1', '1'}},
{{'1', '1', '1'}, {'n', '1', 'n'}, {'j', 'j', 'o'}, {'o', 'j', 'j'}}};
//Table 6.3.1.5-7 Precoding Matrix W 4 layers 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_4l_4p[5][4][4] = {
{{'1', '0', '0', '0'}, {'0', '1', '0', '0'}, {'0', '0', '1', '0'}, {'0', '0', '0', '1'}},//pmi 0
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'1', 'n', '0', '0'}, {'0', '0', '1', 'n'}},
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'j', 'o', '0', '0'}, {'0', '0', 'j', 'o'}},
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'1', '1', 'n', 'n'}, {'1', 'n', 'n', '1'}},//pmi 3
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'j', 'j', 'o', 'o'}, {'j', 'o', 'o', 'j'}}//pmi 4
const char nr_W_4l_4p[5][4][4] = {
{{'1', '0', '0', '0'}, {'0', '1', '0', '0'}, {'0', '0', '1', '0'}, {'0', '0', '0', '1'}}, // pmi 0
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'1', 'n', '0', '0'}, {'0', '0', '1', 'n'}},
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'j', 'o', '0', '0'}, {'0', '0', 'j', 'o'}},
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'1', '1', 'n', 'n'}, {'1', 'n', 'n', '1'}}, // pmi 3
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'j', 'j', 'o', 'o'}, {'j', 'o', 'o', 'j'}} // pmi 4
};
void nr_modulation(uint32_t *in,
@@ -607,7 +599,8 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
uint64_t dl_CarrierFreq = fp->dl_CarrierFreq;
uint64_t ul_CarrierFreq = fp->ul_CarrierFreq;
double f[2] = {(double)dl_CarrierFreq, (double)ul_CarrierFreq};
uint64_t sl_CarrierFreq = fp->sl_CarrierFreq;
double f[3] = {(double)dl_CarrierFreq, (double)ul_CarrierFreq, (double)sl_CarrierFreq};
const int nsymb = fp->symbols_per_slot * fp->slots_per_frame/10;
const double Tc=(1/480e3/4096);
@@ -615,10 +608,10 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
const double Ncp0=16*64 + (144*64*(1/(float)(1<<fp->numerology_index)));
const double Ncp1=(144*64*(1/(float)(1<<fp->numerology_index)));
for (uint8_t ll = 0; ll < 2; ll++){
for (uint8_t ll = 0; ll < sizeof(f)/sizeof(f[0]); ll++){
double f0 = f[ll];
LOG_D(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
LOG_I(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
c16_t *symbol_rotation = fp->symbol_rotation[ll];
double tl = 0.0;
@@ -673,7 +666,7 @@ void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp)
}
}
int nr_layer_precoder(int16_t **datatx_F_precoding, char *prec_matrix, uint8_t n_layers, int32_t re_offset)
int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset)
{
int32_t precodatatx_F = 0;

View File

@@ -29,12 +29,12 @@
#define DMRS_MOD_ORDER 2
/*Precoding matices: W[pmi][antenna_port][layer]*/
extern char nr_W_1l_2p[6][2][1];
extern char nr_W_2l_2p[3][2][2];
extern char nr_W_1l_4p[28][4][1];
extern char nr_W_2l_4p[22][4][2];
extern char nr_W_3l_4p[7][4][3];
extern char nr_W_4l_4p[5][4][4];
extern const char nr_W_1l_2p[6][2][1];
extern const char nr_W_2l_2p[3][2][2];
extern const char nr_W_1l_4p[28][4][1];
extern const char nr_W_2l_4p[22][4][2];
extern const char nr_W_3l_4p[7][4][3];
extern const char nr_W_4l_4p[5][4][4];
/*! \brief Perform NR modulation. TS 38.211 V15.4.0 subclause 5.1
@param[in] in, Pointer to input bits
@param[in] length, size of input bits
@@ -112,7 +112,8 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
c16_t* txdata,
int slot,
int first_symbol,
int nsymb);
int nsymb,
int link_type);
void init_symbol_rotation(NR_DL_FRAME_PARMS *fp);
@@ -122,17 +123,15 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
c16_t *rxdataF,
int slot,
int first_symbol,
int nsymb);
int nsymb,
int link_type);
/*! \brief Perform NR precoding. TS 38.211 V15.4.0 subclause 6.3.1.5
@param[in] datatx_F_precoding, Pointer to n_layers*re data array
@param[in] prec_matrix, Pointer to precoding matrix
@param[in] n_layers, number of DLSCH layers
*/
int nr_layer_precoder(int16_t **datatx_F_precoding,
char *prec_matrix,
uint8_t n_layers,
int32_t re_offset);
int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset);
int nr_layer_precoder_cm(int16_t **datatx_F_precoding,
int *prec_matrix,

View File

@@ -37,6 +37,7 @@ This section deals with basic functions for OFDM Modulation.
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "modulation_common.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "../executables/softmodem-common.h"
//#define DEBUG_OFDM_MOD
@@ -45,15 +46,15 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
PHY_ofdm_mod(txdataF, // input
txdata, // output
PHY_ofdm_mod((int *)txdataF, // input
(int *)txdata, // output
frame_parms->ofdm_symbol_size,
1, // number of symbols
frame_parms->nb_prefix_samples0, // number of prefix samples
CYCLIC_PREFIX);
PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size, // input
txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0, // output
PHY_ofdm_mod((int *)txdataF+frame_parms->ofdm_symbol_size, // input
(int *)txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0, // output
frame_parms->ofdm_symbol_size,
nsymb-1,
frame_parms->nb_prefix_samples, // number of prefix samples
@@ -280,7 +281,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
}
void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms)
void do_OFDM_mod(c16_t **txdataF, c16_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms)
{
int aa, slot_offset, slot_offset_F;
@@ -292,39 +293,39 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
if (is_pmch_subframe(frame,next_slot>>1,frame_parms)) {
if ((next_slot%2)==0) {
LOG_D(PHY,"Frame %d, subframe %d: Doing MBSFN modulation (slot_offset %d)\n",frame,next_slot>>1,slot_offset);
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output
PHY_ofdm_mod((int *)&txdataF[aa][slot_offset_F], // input
(int *)&txdata[aa][slot_offset], // output
frame_parms->ofdm_symbol_size,
12, // number of symbols
frame_parms->ofdm_symbol_size>>2, // number of prefix samples
CYCLIC_PREFIX);
if (frame_parms->Ncp == EXTENDED)
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output
PHY_ofdm_mod((int *)&txdataF[aa][slot_offset_F], // input
(int *)&txdata[aa][slot_offset], // output
frame_parms->ofdm_symbol_size,
2, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX);
else {
LOG_D(PHY,"Frame %d, subframe %d: Doing PDCCH modulation\n",frame,next_slot>>1);
normal_prefix_mod(&txdataF[aa][slot_offset_F],
&txdata[aa][slot_offset],
normal_prefix_mod((int32_t *)&txdataF[aa][slot_offset_F],
(int32_t *)&txdata[aa][slot_offset],
2,
frame_parms);
}
}
} else {
if (frame_parms->Ncp == EXTENDED)
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output
PHY_ofdm_mod((int *)&txdataF[aa][slot_offset_F], // input
(int *)&txdata[aa][slot_offset], // output
frame_parms->ofdm_symbol_size,
6, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX);
else {
normal_prefix_mod(&txdataF[aa][slot_offset_F],
&txdata[aa][slot_offset],
normal_prefix_mod((int32_t *)&txdataF[aa][slot_offset_F],
(int32_t *)&txdata[aa][slot_offset],
7,
frame_parms);
}
@@ -337,17 +338,18 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
c16_t *txdataF,
int slot,
int first_symbol,
int nsymb)
int nsymb,
int link_type)
{
int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot;
c16_t *symbol_rotation = fp->symbol_rotation[0] + symb_offset;
c16_t *symbol_rotation = fp->symbol_rotation[link_type] + symb_offset;
for (int sidx = first_symbol; sidx < first_symbol + nsymb; sidx++) {
c16_t *this_rotation = symbol_rotation + sidx;
c16_t *this_symbol = (txdataF) + sidx * fp->ofdm_symbol_size;
LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n",
LOG_I(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n",
sidx,
slot,
sidx + symb_offset,
@@ -371,4 +373,4 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
}
}
}

Some files were not shown because too many files have changed in this diff Show More