Commit Graph
100 Commits
Author SHA1 Message Date
Laurent THOMAS a1b4220a91 Exclusively use OAI_RNGSEED env variable everywhere
Hide normal table initialization of Ziggurat generator from outside to
force the usage of randominit() for RNG initialization. In this step,
remove the randominit() seed parameter and only rely on OAI_RNGSEED for
a consistent RNG initialization, as this parameter was used differently
("0" as fixed number or to force a random seed).

Now, only use OAI_RNGSEED env variable to force the usage of a fixed
seed.
2025-12-01 12:10:31 +01:00
Laurent THOMAS 3f27ae26ae C code cleaning, no change 2025-11-06 12:51:50 +01:00
Laurent THOMAS db09f50ae4 phy_procedures_gNB_uespec_RX is too long function with too long lines of code, this commit only shorten lines and improve a bit the readability 2025-11-05 12:03:17 +01:00
Laurent THOMAS ab14e3ad22 move all antennas comon code of begining of nr_pdcch_channel_estimation to prepare the future move of the antenna loop above the serial call of functions to decode pdcch 2025-11-03 20:33:20 +01:00
Laurent THOMAS f982d9b5df rename a function to what it does (it generate a reference signal) and minor readability changes 2025-11-03 20:24:37 +01:00
Laurent THOMAS 032fc5e9c2 fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not processing useless samples in one symbol 2025-11-03 20:16:41 +01:00
Laurent THOMAS 9ce9c16e36 Add documentation on PRACH processing 2025-10-30 23:01:06 +01:00
Laurent THOMAS d8d1520580 reduce sl_ahead to catch the RACH Msg1 in time in 24PRB test
a bit difficult to understand: sl_ahead=6 => we systematically miss the
rach detection in the scheduler because the scheduler runs more than 6
slots ahead the rx slot processing (here > 11 slots because 6 (DL and UL
slots) + 4 (RU_RX_SLOT_DEPTH, so UL only))

so, reducing sl_ahead works better than large sl_ahead because the idea
behind is: the scheduler of slot+sl_ahead will never create work to do
in a UL slot before slot+sl_ahead+X (as minimum k2 is X, in the 24PRB CI
test: 6)
2025-10-30 23:01:06 +01:00
Laurent THOMAS 0d083d83fc Simplify code through lookup of PDU name, delete commented code 2025-10-30 23:01:06 +01:00
Laurent THOMAS 80223d36d5 Rename nr_fill_prach to nr_schedule_rx_prach() 2025-10-30 23:01:06 +01:00
Laurent THOMAS 1292cd68b7 Remove the usage of global mem for rach rx process
saves about 600MB of memory allocation

Move the definition of PRACH items and the PRACH list to the
defs_nr_commons.h file.

Do not re-write the entire structure in nr_schedule_rx_prach(), as it is
quite large now.
2025-10-30 23:01:06 +01:00
Laurent THOMAS fff95cc075 Refactor rx_nr_prach 2025-10-30 11:54:44 +01:00
Laurent THOMAS d745e6fcd3 Make the decidated structure the PRACH decoding values contextual
The function rx_nr_prach become autonomous, it doesn't read anymore global variables
So, it can become (later) a threadpool work, that will send a message when it finishes
rx_nr_prach_ru() still use some global variables, but it is executed in sequence, inside the ru main loop, that limits the probability of race conditions
2025-10-30 11:54:43 +01:00
Laurent THOMAS 4f39ba8f51 create a trace group for nr rach 2025-10-30 11:54:41 +01:00
Laurent THOMAS 180f83d196 Refactor L1_nr_prach_procedures 2025-10-30 11:54:40 +01:00
Laurent THOMAS d24e010367 simplify computation of ru->prach_rxsigF[prachOccasion][aa] 2025-10-30 11:54:36 +01:00
Laurent THOMAS c48e0b1a32 merge variants of prach_item_t as this is the same in gNB and RU 2025-10-30 11:54:33 +01:00
Laurent THOMAS d005336cb8 Simplify PRACH beam handling, remove race
Simplify by removing a small malloc and memcpy() the beams. This should
also remove the data race between ru and gNB/CU-DU
2025-10-30 11:54:30 +01:00
Laurent THOMAS cffb07d798 remove permanent prach rxsigF in gNB and simplify the data structure 2025-10-30 11:54:22 +01:00
Laurent THOMAS 4dd340b6bb merge almost duplicated code for ru prach list and gNB prach list
(gNB is not the proper name, it is CU+DU, gNB is RU+CU+DU)
2025-10-30 11:54:21 +01:00
Laurent THOMAS 88cecd707b regroup similar lists for "ru" and "gNB" in a common definition
Merge the identical sizes. Use correct naming: it is a element of a
list, not a list
2025-10-30 11:54:20 +01:00
Laurent THOMAS a4d3eb9fad replace fix array index by pointers for prach lists in gNB 2025-10-30 11:54:18 +01:00
Laurent THOMAS f5c1d18638 Fix bug in "freeing" prach occasions scheduler after decoding first occasion
Release PRACH only after treating the entire PRACH slot/work. Also,
release only once, not on every decoding occasion.
2025-10-30 11:54:14 +01:00
Laurent THOMAS a07c03e65f MAC: use pointers, rewrite FAPI PDU alloc 2025-10-30 11:54:13 +01:00
Laurent THOMAS 7d90d9b23e log: make input parameters const 2025-10-30 11:54:11 +01:00
Laurent THOMAS f11361343c add management of nb tx antennas=0 in rfsimulator code
trace the error of 0 antennas, and avoid infinite loop of calls to read
0 bytes
2025-10-30 11:54:09 +01:00
Laurent THOMAS 9ddb8c0b9f Remove prach_ifft from premanent allocation
Allocate on the stack when necessary.
2025-10-30 11:54:01 +01:00
Laurent THOMAS e54738c7e4 flush command line printf, it is called before log module initialisation 2025-10-30 11:53:57 +01:00
Laurent THOMAS 7157d4bcd1 add trace when the main NR UE thread ends and when NR UE sets oai_exit variable 2025-10-30 11:53:46 +01:00
Laurent THOMAS 83fed82bcf fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant
with this commit, the gNB can work if we change RU_RX_SLOT_DEPTH to
another value than 4 but it remain not well designed
2025-10-24 08:11:13 +02:00
Laurent THOMAS 1dd0194e32 remove unused global queues, dead code 2025-10-14 20:36:48 +02:00
Laurent THOMAS e056acc896 use c16_t type for pm weights, as it is already same type
simplify SIMD version of precoder
2025-10-09 16:04:43 +02:00
Laurent THOMAS c537e2cabe move complex numbers types above phy layer, as they are used in fapi for example 2025-10-09 16:01:09 +02:00
Laurent THOMAS 8b9098b7ca remove unused declarations in common/platform_types.h 2025-10-09 16:01:09 +02:00
Laurent THOMAS 00a7890449 asn1c doesn't follow c99 variables alias rules, it needs to be compiled this way. issue #509 reported in https://github.com/vlm/asn1c 2025-10-09 14:04:14 +02:00
Laurent THOMAS 7355b55ad1 this MR replaces constants INT16_MIN by -INT16_MAX (so -32767) in places where it used for mathematical operations 2025-10-03 10:02:48 +02:00
Laurent THOMAS a0d8baf323 update and rename TESTING_GNB_W_COTS_UE.md to describe actual content 2025-10-01 16:22:46 +02:00
Laurent THOMAS 3f9dcee5fa remove a dead function 2025-09-29 15:14:39 +02:00
Laurent THOMAS 912463f752 modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable 2025-09-25 09:29:44 +02:00
Laurent THOMAS 06914f3dde improve dci rejection test: system DCIs are tackled only if we expect system DCIs 2025-09-22 19:12:24 +02:00
Laurent THOMAS 311a857cb3 move a bad global var in a better place 2025-09-22 19:12:24 +02:00
Laurent THOMAS a71a813a7c replace bad DCI by specific message for each case and add checks for bad pointers, or sanitize detected warnings 2025-09-22 19:12:24 +02:00
Laurent THOMAS c833aee524 refine the LTE prach fix from cppcheck error detection 2025-09-09 18:07:31 +02:00
Laurent THOMAS af125c39df array test overflow and possible divide by 0 fixes 2025-09-09 18:07:31 +02:00
Laurent THOMAS 10f304d9da return a error case before a SEGV if the pointer is null 2025-09-09 18:07:31 +02:00
Laurent THOMAS bc238f9b2f fix as i can a error detected by cppcheck, w[lprime] is only 0, 1 or -1 2025-09-09 18:07:31 +02:00
Laurent THOMAS 3190ad47b1 avoid a cppcheck warning 2025-09-09 18:04:26 +02:00
Laurent THOMAS 5d118cf170 fix lack of test for fopen() return value 2025-09-09 18:04:26 +02:00
Laurent THOMAS 82931c8f01 fix printf() format errors 2025-09-09 18:04:26 +02:00
Laurent THOMAS 278d2cbca1 fix several not tested malloc or calloc return value 2025-09-09 18:04:26 +02:00
Laurent THOMAS 13f5c258ca remove unused global 2025-08-20 09:36:48 +02:00
Laurent THOMAS 2bda52b054 rename a global "ru" in root_unit and include correctly the .h file, that leads to mistakes fixes 2025-08-20 09:36:48 +02:00
Laurent THOMAS 4b47d26ea2 remove dirty and unused functions with global vars (not working anyway) 2025-08-20 09:36:48 +02:00
Laurent THOMAS c2d9f17242 remove a dependancy of gNB to LTE that is not used and adds global vars to gNB 2025-08-20 09:36:48 +02:00
Laurent THOMAS 4a3ebb3033 remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag 2025-08-20 09:36:48 +02:00
Laurent THOMAS 2dae7b0db4 Limit visibilty of roundKeys 2025-08-20 09:36:48 +02:00
Laurent THOMAS 7cc35cf7e0 remove dead function 2025-08-20 09:36:48 +02:00
Laurent THOMAS c4f4f8d919 Remove threequarter_fs, log_level; make functions static
2 functions with same name as static to make it clearer they are separate.

remove unused copy of log_level global var.

remove threequarter sampling variable from the radio board general
configuration. The decision of sampling rate is made above. A better
behavior can be done later, like ask to the radio board what sampling
rate it can do,then use it to decide the appropiate sampling rate from
the gNB configuration. In UE case, it is another issue, as the sampling
rate would change after we decode SIB1, but also it is not developped
yet.
2025-08-20 09:36:23 +02:00
Laurent THOMAS 78f12dbc03 Change tracy version to latest release 2025-08-20 09:32:23 +02:00
Laurent THOMAS 29108a0974 cleaning syntax of nr-ru.c 2025-08-16 21:38:18 +02:00
Laurent THOMAS efccad956a add gtpu error packet parsing and display 2025-08-13 18:00:31 +02:00
Laurent THOMAS e2c4033b57 When a client connects, we need to start the send/receive loop but the first reception is void data 2025-08-12 09:22:03 +02:00
Laurent THOMAS 02ce4aaf82 Fix a 4G UE bug 2025-07-30 17:41:28 +02:00
Laurent THOMAS 426e3453cd trace to try to debug old 4G bug 2025-07-30 17:41:28 +02:00
Laurent THOMAS 990fc9c55a Fix potential out-of-bound write
Tell strncpy() the size including the NULL byte to make sure we copy all
data.

This just fixes these warnings:

    openair3/NAS/TOOLS/conf_usim.c: In function ‘gen_usim_data’:
    openair3/NAS/TOOLS/conf_usim.c:191:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:190:53: note: length computed here
    openair3/NAS/TOOLS/conf_usim.c:195:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:194:54: note: length computed here

add copy with limited size and truncate properly with null C string termination.

As clang-format doesn't handle tab indented files and as it is not the
OAI coding rule, the entire file is re-indented with present OAI coding
rule.
2025-07-30 17:40:50 +02:00
Laurent THOMASandRobert Schmidt b65b5dd40e Remove specific directory for LTE SIM management tools
Move into openair3/NAS/TOOLS/CMakeLists.txt, and simplify the
CMakeLists.txt.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-07-30 17:39:12 +02:00
Laurent THOMAS f835705dd1 fix array sizes and aligment issues in 5G UE dci decoder 2025-07-25 15:49:35 +02:00
Laurent THOMAS 343b983aa9 fix SIMD tail length in nr_pdcch_detection_mrc() and replace >> operator by / 2025-07-25 10:04:13 +02:00
Laurent THOMAS b41c9e2e85 move static some functions that are used only in one file 2025-07-25 10:04:13 +02:00
Laurent THOMAS 19d783f6d9 generalize constant nb re per rn in dci_nr.c 2025-07-25 10:04:04 +02:00
Laurent THOMAS e8f6d14c47 simplify and make more local variables in nr_rx_pdcch() and fix small bugs (size 9 RE instaed of 12 RE) 2025-07-25 10:02:26 +02:00
Laurent THOMAS b30da5c0b2 reduce size and make local rxdataF_comp in nr_rx_pdcch() 2025-07-25 10:02:26 +02:00
Laurent THOMAS 2c22f49a45 simplify nr_pdcch_channel_compensation() 2025-07-25 10:02:26 +02:00
Laurent THOMAS 3ca12f78e5 simplify function nr_pdcch_extract_rbs_single() 2025-07-25 10:02:26 +02:00
Laurent THOMAS fffe9531c3 add assert in a case of wrong gNB configuration file 2025-07-25 10:02:26 +02:00
Laurent THOMAS 8dd2119d4e bad type multi casts with wrong meaning like cast to ** a array of 2D (wrong in C) 2025-07-24 13:48:36 +02:00
Laurent THOMAS 3264eca6db enhance llr unitary tests 2025-07-24 13:48:36 +02:00
Laurent THOMAS f57f6a8d4e factorize code that initialize all 0xff simd vectors 2025-07-24 13:48:36 +02:00
Laurent THOMAS 90cf249018 add telnet commands trace 2025-07-04 09:34:17 +02:00
Laurent THOMAS 0523bcfbde fix gNB that should always perform tx in case of rfsim (like continuous-tx 2025-06-30 10:21:02 +02:00
Laurent THOMAS 1540ca3ae5 fix bug in rfsim->nb_cnx for client side. it has no usage except a cpu optimisation in case one single rfsim socket and SISO case 2025-06-30 09:06:28 +02:00
Laurent THOMAS f7598bf528 clarify first transmission to client, split process_recv in 2 functions 2025-06-30 09:06:28 +02:00
Laurent THOMAS 68857114a6 split rfsimulator too long function in smaller ones. Clean code for bad "UE" instead of rfsim client/server. Simplify logic 2025-06-30 09:06:28 +02:00
Laurent THOMAS b9c066329e trace in 4G RAR processing to debug ci result 2025-06-30 09:06:28 +02:00
Laurent THOMAS 98e6d60337 RF simulator: Fix concurrency issues during new client connections
Fix concurrency issues happening when a new client connects, sometimes
leading to a total softmodem deadlock.

Key changes:
- Fix sample sending on new client connection: send the first
  sample only to the newly connected client.
- Remove the --rfsimulator.hanging-workaround option
- Replace global nb_ue and Sockmutex with nb_cnx and Sockmutex
  in rfsimulator_state_t for better concurrency and clarity.
2025-06-30 09:06:28 +02:00
Laurent THOMAS fb85a8cda3 clarify and indent correctly the function initial sync 2025-06-27 15:21:47 +02:00
Laurent THOMAS 10ff80815f when we try to detect a specific PCI, and it fails, the SSS detection return successful detection, with wrong frequency offset 2025-06-27 15:21:13 +02:00
Laurent THOMAS 72c29248a3 remove dead globals 2025-06-03 17:03:17 +02:00
Laurent THOMAS 33d72f6080 fix C style, unefficient and complex 2025-05-09 12:10:41 +02:00
Laurent THOMAS 44716febce ue txData more contextual, but still global as it is entangled with usrp driver 2025-05-09 12:10:39 +02:00
Laurent THOMAS 1208521959 remove dead code and a wrong comment 2025-04-28 11:59:17 +02:00
Laurent THOMAS d980301f29 fix old bug always increasing frame_tx compared with 3GPP frame number 2025-04-27 20:27:36 +02:00
Laurent THOMAS 8c55c4b8ab move traces of phy simulators to stdout (some were in stderr) 2025-04-25 14:47:59 +02:00
Laurent THOMAS 7982a9da41 set correct parameter type, and fuse funcions that do same real/complex vector operations, doing this, fix a lot of unitary multiplications (else there would be numerous cast operations 2025-04-25 14:47:59 +02:00
Laurent THOMAS 95ae7772bf simplifly, reegroup functions in tools_defs.h 2025-04-25 14:47:59 +02:00
Laurent THOMAS 04fc2fbb2e make correct description of sub_cpx_vector16 and remove mixed dead code 2025-04-25 14:47:59 +02:00
Laurent THOMAS 4e3fab67a8 remove unused function with duplicated name to another one 2025-04-25 14:47:59 +02:00
Laurent THOMAS 2528a0614a - replace SIMDE package internal types usage by oai defined types
- remove some unused functions
2025-04-25 14:47:59 +02:00
Laurent THOMAS fefb96a115 merge functions conj(a)*b and a*conj(b) 2025-04-25 14:47:59 +02:00
Laurent THOMAS bb93b06663 use one call to multiply the full size vector 2025-04-25 14:47:59 +02:00