Compare commits

..

1 Commits

Author SHA1 Message Date
melissa
fa933b920f convolution on strongest taps rather than weakest 2026-04-21 14:46:26 -07:00
4 changed files with 21 additions and 142 deletions

140
configure vendored
View File

@@ -1,140 +0,0 @@
#!/bin/bash
#/*
# * 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
# */
#set -xv
function print_help() {
echo "
By default, it creates a build directory and creates building files in this directory
The external packages needs to be installed before
See doc/BUILD.md for more details
The simplest starting point is to:
install asn1c from source (in doc/BUILD.md: you can also just install asn1c like this ...)
Then, running ./configure will fail on the packages missing in your Linux, you can install by trial/error
Possible options are all cmake available options, and OpenAirInterface specific options
*** input/output directory
--build-dir
The building directory (instead of 'current directory'/build)
The input file is the current directory file CMakeLists.txt
*** Binary generation options ***
-GNinja or -G\"Unix Makefiles\"
cmake method to use Ninja or other build tools (default to standard make)
-DCMAKE_C_COMPILER=gcc-4.2 -DCMAKE_CXX_COMPILER=g++-4.2
choose compiler
-DCMAKE_BUILD_TYPE=Release|RelWithDebInfo|MinSizeRel|Debug
predefined cmake options to the compiles (Debug adds -O0 for example)
-DAVX512=OFF
block AVX512 instructions generation (AVX2 is mandatory in OAI)
-DSANITIZE_ADDRESS=True -DSANITIZE_UNDEFINED=True -DSANITIZE_THREAD=True
gcc/clang sanitizers
*** memory dimensioning
-DUE_EXPANSION=True
Change the maximum managed UEs in one Cell for 4G and 5G nodeB for 40 to 256
-DNB_ANTENNAS_RX=xxx
limit the number of managable RX antennas at runtime
-DNB_ANTENNAS_TX=xxx
limit the number of managable TX antennas at runtime
*** Features generation options ***
-DOAI_xxx=ON
Enable specific RF boards or simulation
xxx can be: USRP BLADERF LMSSDR IRIS SIMU AW2SORI AERIAL ETHERNET FHI72 FHI72_MPLANE
WLS (WLS for nfapi instead of regular sockets interface)
-DENABLE_xxx=ON
enable specific add-on
xxx can be
TELNETSRV
ENBSCOPE UESCOPE NRSCOPE IMSCOPE IMSCOPE_RECORD
OAI_IQPLAYER
WEBSRV
LDPC_CUDA LPDC_AAL LDPC_XDMA
-DE2_AGENT=ON
Enable the E2 Agent
*** Tracing options **
-DENABLE_LTTNG=ON
use lttng as trace output
-DT_TRACER=ON
Enable T tracer tool instead of regular trace output
-DT_TRACER_GUI
Adds a GUI to T tracer
-DUE_DEBUG_TRACE=ON
Adds more traces in UE
-DENABLE_VCD_FIFO=ON
enable VCD trace tool (deprecated)
-DTRACE_ASN1C_ENC_DEC=ON
Enable asn1c internal traces via OAI logging system (huge trace)
-DTRACY_ENABLE=ON
Enable tracy code profiler instrumentation
*** testing options ***
-DENABLE_PHYSIM_TESTS=ON
create test scripts to run a set of physical layer auto-tests
more details in doc/physical-simulators.md
if you run "ctest" after compilation, a set of prepared executions will run
-DENABLE_TESTS
create unitary test scripts based on ctest googletest
more details in docs/UnitTests.md
if you run "ctest" after compilation, a set of prepared executions will run
*** documentation generation
-DGENERATE_DOXYGEN=ON
generate doxygen documentation
--build-lib <libraries>
Build optional shared library, <libraries> can be one or several of $OPTIONAL_LIBRARIES or \"all\"
-h | --help
Print this help"
}
args=()
BUILD_DIR=build
until [ -z "$1" ]
do
case "$1" in
-d | --build-dir)
BUILD_DIR=$2
shift 2;;
-h | --help)
print_help
exit 1;;
*)
args+=("$1")
shift;;
esac
done
cur_dir=$PWD
mkdir -p "$BUILD_DIR" || exit
pushd "$BUILD_DIR" || exit
cmake -DT_TRACER=OFF "${args[@]}" "$cur_dir"
if [ -f build.ninja ] ; then
cmd=ninja
else
cmd="make -j$(nproc)"
fi
popd
echo "all:" > Makefile
echo -e "\\tcd $BUILD_DIR; $cmd" >> Makefile

View File

@@ -46,17 +46,35 @@ void do_convolution_and_noise(int nb_tx,
{
const int batch_size = 4000;
cf_t work_buffer[batch_size] __attribute__((aligned(64)));
// Pre-scan: build strong tap indices for each TX antenna
int strong_tap_indices[nb_tx][channel_length] __attribute__((aligned(32)));
int num_strong_taps[nb_tx] __attribute__((aligned(32)));
for (int tx_ant = 0; tx_ant < nb_tx; tx_ant++) {
num_strong_taps[tx_ant] = 0;
for (int l = 0; l < channel_length; l++) {
if (squaredMod(channel[tx_ant][l]) >= THRES) { // Strong tap
strong_tap_indices[tx_ant][num_strong_taps[tx_ant]] = l;
num_strong_taps[tx_ant]++;
}
}
}
for (int batch_start = job_index * batch_size; batch_start < num_samples; batch_start += batch_size * num_jobs) {
int batch_end = min(batch_start + batch_size, num_samples);
if (noise_power > 0.0f) {
get_noise_vector((float *)work_buffer, batch_size * 2);
}
for (int i = batch_start; i < batch_end; i++) {
float rx_r = 0.0f;
float rx_i = 0.0f;
for (int tx_ant = 0; tx_ant < nb_tx; tx_ant++) {
for (int l = 0; l < channel_length; l++) {
// Iterate only over strong taps
for (int tap_idx = 0; tap_idx < num_strong_taps[tx_ant]; tap_idx++) {
int l = strong_tap_indices[tx_ant][tap_idx]; // Get actual tap delay index
int idx = i + (channel_length - 1) - l;
c16_t in_sample;
if (idx < num_samples_tx_sig0) {

View File

@@ -4,6 +4,7 @@
#ifndef _CHANNEL_CONVOLUTION_H_
#define _CHANNEL_CONVOLUTION_H_
#define THRES 0.03
#ifdef __cplusplus
extern "C" {

View File

@@ -4,7 +4,7 @@ add_executable(rrc_bearers_test rrc_bearers_test.c ../rrc_gNB_radio_bearers.c ${
add_dependencies(tests rrc_bearers_test)
add_test(NAME rrc_bearers_test COMMAND rrc_bearers_test)
target_include_directories(rrc_bearers_test PRIVATE ./common/utils/ds common/utils/LOG)
target_link_libraries(rrc_bearers_test PRIVATE ds alg asn1_e1ap asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs LOG ${T_LIB})
target_link_libraries(rrc_bearers_test PRIVATE ds alg asn1_e1ap asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs LOG T)
target_compile_definitions(rrc_bearers_test PRIVATE ENABLE_TESTS)
add_executable(rrc_cell_management_test rrc_cell_management_test.c)