Commit Graph
75 Commits
Author SHA1 Message Date
Bartosz Podrygajlo 0daabdeb87 Update the aw2s entrypoint to support new yaml config and updated images 2024-10-07 09:15:44 +02:00
Bartosz Podrygajlo 8e6234a2f5 Enable gNB configuration through YAML file 2024-10-07 09:10:42 +02:00
Bartosz Podrygajlo fecff5f346 Reset SRS power control adjustment state if p0 or alpha is provided
Reset h_b_f_c (SRS power control adjustment state) when SRS-ResourceSet
p0 or alpha is provided by higher layers, accroding to 38.213 7.3.1.
2024-10-01 10:15:40 +02:00
Bartosz Podrygajlo 7359c6b66e Move h_b_f_c to UL BWP
Move h_b_f_c (or SRS power control adjustment state) to UL BWP structure. This is a per
bwp parameter so it makes sense to make its lifetime the same as BWP, even if we dont support
>1 UL BWPs.
2024-10-01 10:15:33 +02:00
Bartosz Podrygajlo bfc47445ee SRS tx power with power control state 2024-10-01 10:15:23 +02:00
Bartosz Podrygajlo b2c49fbc27 Add time-domain scope to gNB imscope. 2024-09-30 20:41:08 +02:00
Bartosz Podrygajlo 80f90b5599 Add time domain sample scope before sync
Added new data sync for UE which displays time domain samples read from RF device
before synchronization to PSS/SSS
2024-09-30 20:36:38 +02:00
Bartosz Podrygajlo 43a9236963 Improve imscope's scatterplot
- Reduce point size to 1 pixel
 - call ImPlot::PlotScatter as many times as needed
2024-09-30 20:36:18 +02:00
Bartosz Podrygajlo 7986a4de8e Time domain samples scope for NR UE
Add a new scope data source (ueTimeDomainSamples) which provides time domain samples
for antenna 0 to the scope. Add graphical representation of the data in imscope.

Removed C-define from ENABLE_IMSCOPE cmake option, the #define was unused and this way
code does not have to be recompiled when imscope enable state changes.
2024-09-30 20:34:09 +02:00
Bartosz Podrygajlo 65f14490c3 Remove additional unnecessary includes 2024-09-26 15:07:35 +02:00
Bartosz Podrygajlo 23cc049157 Remove unnecessary includes in rfsimulator 2024-09-26 14:59:14 +02:00
Bartosz Podrygajlo 771d11a148 dockerized clang-format error detection tool 2024-09-17 13:52:01 +02:00
Bartosz Podrygajlo ca217f8f5b Workaround for PUSCH TX power not applied in PHY
This is a temporary workaround for issue with UE PHY not applying TX power
instructions from MAC. To be reverted once implementation of TX gain control
is finished.
2024-09-06 08:39:54 +02:00
Bartosz Podrygajlo 9b59ba6326 Enable configuration of NR UE through a YAML file
This commit adds yaml-cpp library to required docker images and build commands. There is one workaround
in cross-compilation for apt behavior for installing libyaml-cpp-dev. Apt will uninistall previous
versions of the package whenever another one is installed. This means that installing the arm version
breaks amd version and vice versa. This makes it impossible to have both libs installed at the same
time which is required by the cross-compilation build command (it calls cmake twice, once with native
and once with target architecture)
2024-09-06 08:34:18 +02:00
Bartosz Podrygajlo 0b684732ee YAML as a drop-in replacement for libconfig
This commit introduces a substitute module library for setting up softmodems using YAML instead of libconfig.
The softmodems should work the same with both types of files. Extra care was put to make sure the behavior
of both modules is the same.

Example yaml config files were added for the UE and gNB
2024-09-06 08:33:10 +02:00
Bartosz Podrygajlo e1879c07bc Fix segfault when attempting to use unsupported scope types in nrscope
Do not attempt to copy scope types >= MAX_SCOPE_TYPES in nrscope as it does
not support them at this point.
2024-09-05 15:21:07 +02:00
Bartosz Podrygajlo 8eb9e3d902 Fix pdschRxdataF_comp phy scope data source
pdschRxdataF_comp data source was handled incorrectly. Each symbol entire slot data was copied. This
caused pdschRxdataF_comp to mostly contain zeros. The call to UEscopeCopy was moved from symbol loop
into last symbol processing. In case imscope is used padding and unused REs are not copied to the
sink.

Added checks inside scope functions to ensure correct functionality.
2024-09-05 15:19:37 +02:00
Bartosz Podrygajlo d8bba3124f Add imscope to optional libraries in ./build_oai 2024-09-05 15:19:17 +02:00
Bartosz Podrygajlo 6dcd3ae8c4 Use --imscope flag to enable/disable imscope 2024-09-05 15:19:09 +02:00
Bartosz Podrygajlo bdc6df8c42 NR UE & gNB imscope.
A new phy scope based on ImGui and ImPlot. This scope uses a different concurrency model than previous
scopes.

The PHY thread writing the data first checks if the data is ready to be written. If its not, nothing is copied.
The GUI thread reads data if available and marks it ready to write. This makes sure that the PHY threads are not
busy copying data that would never be displayed.

Some of the scopes also have a freeze functionality that further limit the amount of data that needs to be copied
from PHY threads. If a scope is "frozen" it still allows the user to explore the data using plots zoom/pan functions
but doesn't cause PHY threads to perform extra writes on the displayed data.

A compile option was added to enable/disable the scope. Use cmake -DENABLE_IMSCOPE=ON to enable the scope.

Update CXX standard to 17; it is required by some libraries (e.g., dear imgui). The oldest gcc version in
use by a distribution supported is Ubuntu 20, which has gcc 9.4 with c++17 support.
2024-09-05 15:19:00 +02:00
Bartosz Podrygajlo 97dfa90cf2 Add two ldpc testcases for checking small block sizes
Added 2 testcases for Zc = 64 for ldpc encoder. These testcases check optimized ldpc
implementation against reference.
2024-08-28 17:48:42 +02:00
Bartosz Podrygajlo 732555ddc3 Run optimized parity check in ldpc encoder only on supported Zc values
Optimized ldpc encoder was run for Zc values that are not supported (Zc == 64). This
commit fixes the fallback condition to Zc >= 72 for BG 2
2024-08-28 17:40:19 +02:00
Bartosz Podrygajlo 0883904891 Introduce benchmark test for rotate_cpx_vector
This commit introduces google benchmark library and one benchmark for
rotate_cpx_vector.  Also extracted common tools used in testcases for
generation and allocation of byte aligned vectors in phy_test_tools.hpp
2024-08-28 15:08:44 +02:00
Bartosz Podrygajlo 50f8f3de58 Fix formatting in nr_nas_msg_sim.c 2024-08-23 10:45:45 +02:00
Bartosz Podrygajlo 4f12a25ebd Cleanup NR UE NAS instance handling
- Save nas instance id in nr_ue_nas_t and use that for instance determination.
 - Use correct field in itti message (destinationInstance instead of originInstance) to determine instance
 - Make sure both destinationInstance and originInstance fields are correct in NAS interface functions.
2024-08-23 10:45:36 +02:00
Bartosz Podrygajlo 94e6cdb2bf Duplicate the testcase for llr with avx 256-bit vector instructions disabled.
This creates another test executable for llr with the same testcases but compiled without avx 256-bit
vector instructions.
2024-08-15 13:04:05 +02:00
Bartosz Podrygajlo bbd6f35a6f Fix for nr_ulsch_16/64/256qam_llr reading/writing past buffer size on x86 and ARM.
This fixes out-of-bounds access: nr_ulsch_16qam_llr, nr_ulsch_64qam_llr and nr_ulsch_256qam_llr.
For 256qam this also fixes incorrect llr calculation on arm: the existing AVX code for 2 REs
case produced results not in line with the rest of the code. A testcase check_2_res_256_qam was
added to visualise the differences which can later be used to revive AVX acceleration for 2REs case.
2024-08-15 12:58:23 +02:00
Bartosz Podrygajlo f23c1dff00 Correct gNB received PHR to headroom calculation according to 38.133. 2024-08-02 12:37:47 +02:00
Bartosz Podrygajlo c7c1cb2dbf Enable PHR reporting for NR UE 2024-08-02 12:37:47 +02:00
Bartosz Podrygajlo d465ed2fbc NR UE: Cleanup global variables used for command line parameter storage
Variables moved to nrUEParams:
vcdflag, rx_gain_off, usrp_args, tx_subdev, rx_subdev, reconfig_file, rbconfig_file, uecap_file,
tx_gain, rx_gain

Variables removed:
rx_gain_mode
2024-08-01 09:50:29 +02:00
Bartosz Podrygajlo b0b8818549 Remove unused command like parameter rrc_config_path 2024-08-01 09:48:54 +02:00
Bartosz Podrygajlo b242a483f1 Rewrite NR UE PHY cpu measurements 2024-07-30 19:23:54 +02:00
Bartosz Podrygajlo ed05c94c3e Fix signal_energy_nodc for lengths that are not multiples of 4 2024-07-30 09:44:00 +02:00
Bartosz Podrygajlo 48d68f7d90 Fix a bug where if BWP size is not exactly maximum BWP size for a bandwidth power control code asserts.
This assert and assumption is incorrect, according to 38.101-1 UE channel is defined only by the BWP size
and BWP size can be any value supported by the RRC parameters defining the BWP.
To determine the UE channel the smallest bandwidth supporting the BWP is selected. This is an assumption based
on references in the same document to UE channel bandwidth being equal to one of the values in set
 {5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100}.
Also:
 - calculated P_CMIN during BWP setup since the parameter doesn't depend on DCI.
 - initiialize uniqCfg structure in test_nr_ue_power_procedures main function which enables LOG prints during tests
2024-07-26 11:15:49 +02:00
Bartosz Podrygajlo 93280a3e75 Remove unused nr_dlsch_demod_shift command line parameter from NR UE 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo b2a46e3b76 Remove unused variables from softmodems, focusing on NR UE: chain_offset, card_offset, numerology,
oaisim_flag, dumpframe, rx_input_level_dBm, emulate_rf
2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo 19033ca822 Remove num_missed_slots from softmodems and some extra unused functions from NRUE. 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo ead066d630 Remove unused abstraction_flag from NR UE 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo 2ff1253321 Move init_nr_bler_table out of nr-uesoftmodem.c 2024-07-18 09:31:37 +02:00
Bartosz Podrygajlo dc91550e2c Remove unused flag single_thread_flag from softmodems. 2024-07-18 09:31:29 +02:00
Bartosz Podrygajlo 1f7ec847bc Remove tddflag. Frame type depends on band. 2024-07-18 08:28:54 +02:00
Bartosz Podrygajlo 373b7d9e37 Reset NR UE PUSCH power control state if alpha or p0 is modified by gNB 2024-07-11 16:06:47 +02:00
Bartosz Podrygajlo 04c8f73616 Fix a bug where PUSCH max TX power was not dependant on number of PUSCH RBs or qm. 2024-07-11 15:03:54 +02:00
Bartosz Podrygajlo cd8f076979 PUSCH power control state 2024-07-11 15:03:45 +02:00
Bartosz Podrygajlo 6ce94be807 Use mac->frame_type instead of calcualting frame_type on the fly in nr_get_Pcmax 2024-07-05 16:04:35 +02:00
Bartosz Podrygajlo f325d02d33 Fix several ASN.1 message related memory leaks in NR 2024-07-03 07:29:02 +02:00
Bartosz Podrygajlo 3c5ddf9469 Lift RLC restriction to 1 UE / process 2024-07-01 17:13:31 +02:00
Bartosz Podrygajlo bcfe3a6733 Initialize number of NR UEs equal to --num-ues parameter 2024-07-01 17:13:05 +02:00
Bartosz Podrygajlo d5a4272177 Add parameter --num-ues to NR UE 2024-07-01 17:11:27 +02:00
Bartosz Podrygajlo 83f66f2ade Replace 0 with module id for NR UE
Add UE id to several LOG macros
2024-07-01 17:10:39 +02:00
Bartosz Podrygajlo 2ae138d7c0 docker compose override files for testing with locally modified executables. 2024-06-27 18:45:59 +02:00
Bartosz Podrygajlo 0e6b0f3e7a Fix memory leak in rlc_test_5 and rlc_test_6 2024-06-27 18:38:36 +02:00
Bartosz Podrygajlo 9724ff0329 Fix memory leaks and heap buffer overflow in test_thread-pool. 2024-06-27 18:35:43 +02:00
Bartosz Podrygajlo b1f7cc9025 Add unit testcase for thread-pool.
Extract thread-pool into a separate CMake library.
Extract utils into a separate CMake library.
2024-06-26 10:17:25 +02:00
Bartosz Podrygajlo deacf439a4 CMakeLists for common/utils/LOG 2024-06-26 10:17:15 +02:00
Bartosz Podrygajlo d6f425adc6 Remove unused directory ALG_DS 2024-06-26 10:13:00 +02:00
Bartosz Podrygajlo 28489a29ba Remove references to unused library OML 2024-06-26 10:12:28 +02:00
Bartosz Podrygajlo 8ea2e77ab2 PUSCH power control without PUSCH power control state 2024-06-26 10:08:33 +02:00
Bartosz Podrygajlo d41a6e0524 Remove hardcode for minimum TX power 2024-06-25 18:11:26 +02:00
Bartosz Podrygajlo d8572d5569 Fixed MPR application conditions.
Fixed delta MPR.
Fixed an error in PUCCH PC_MAX calculation.
2024-06-25 18:11:17 +02:00
Bartosz Podrygajlo 4c658cdd50 Add assertion for known segfault during teardown of gNB. 2024-06-18 13:25:59 +02:00
Bartosz Podrygajlo b20561c451 Add libgtest-dev package to unittest image 2024-06-13 10:15:55 +02:00
Bartosz Podrygajlo fadd3d0083 Add unit test build log to artifacts 2024-06-13 10:15:45 +02:00
Bartosz Podrygajlo 44dc8f8daa Add google test testcases for nr_get_Pcmax. 2024-06-13 10:15:32 +02:00
Bartosz Podrygajlo 4a36f7dd7b Extract nr_common and nr_phy_common libs. Also add unit tests for nr_common 2024-06-13 10:14:59 +02:00
Bartosz Podrygajlo 9c913fa040 Introduce googletest library
The library will be either found in the system or downloaded via FetchContent.
2024-06-13 10:13:28 +02:00
Bartosz Podrygajlo 7aec889cf6 Remove some global variables 2024-06-05 09:42:56 +02:00
Bartosz Podrygajlo 760e0aaae4 PUCCH power control state. 2024-06-04 12:04:12 +02:00
Bartosz Podrygajlo a1902a03f8 Accumulate delta PUCCH for each PUCCH occasion. 2024-06-04 12:04:11 +02:00
Bartosz Podrygajlo 6d09f0542b Fix a bug in DELTA_TF calculation for PUCCH format 1. 2024-06-04 12:04:11 +02:00
Bartosz Podrygajlo 4622d33e3b Demystifying 10log10(2^30) in signal energy calculations. 2024-05-28 16:12:36 +02:00
Bartosz Podrygajlo 4a5d924375 Remove accumulated_delta_PUCCH from UE nfapi interface. 2024-05-27 09:22:42 +02:00
Bartosz Podrygajlo 3fd119ff29 Do not send PUCCH ACK on DLSCH that doesnt require it.
UE was attempting to send ACK on MSG2 - was caused by missing brackets in if statement.
2024-05-27 09:17:39 +02:00
Bartosz Podrygajlo b101e682f5 Fix several potential segfaults in UE PUCCH tx power determination. 2024-05-20 15:00:29 +02:00
Bartosz Podrygajlo 70f536a0f0 Correct PRACH preamble tx power calculation.
Removed arbitrary offset of 30dB.
Changed sign for pathloss: pathloss calculated in compute_nr_SSB_PL is the difference between transmitted and received power.
Transmission power for preamble should compensate the pathloss, therefore power should increase with pathloss.
2024-05-08 12:19:08 +02:00