mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 20:50:28 +00:00
Compare commits
59 Commits
develop
...
ambient-io
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
717d8f4220 | ||
|
|
8e651e1d97 | ||
|
|
a686aa8ac8 | ||
|
|
f7a5f2b351 | ||
|
|
b998cc0537 | ||
|
|
be0bb9b276 | ||
|
|
c778cbf1dd | ||
|
|
1dfa1832ad | ||
|
|
821da7073a | ||
|
|
a9d41af2db | ||
|
|
4947d28976 | ||
|
|
080d31ae87 | ||
|
|
3a4a027909 | ||
|
|
0dd60d4570 | ||
|
|
5e57f1227d | ||
|
|
1e1a9dca8b | ||
|
|
d29785295c | ||
|
|
cbb1a0e8a1 | ||
|
|
13777fa4ca | ||
|
|
76edb75586 | ||
|
|
1cc8aeaa42 | ||
|
|
c2c24b3453 | ||
|
|
99c7f6c2c2 | ||
|
|
82f97fad22 | ||
|
|
0fe0a83a6f | ||
|
|
f0ea8a85c5 | ||
|
|
1286a5b379 | ||
|
|
042cf56b9f | ||
|
|
c1f0cf2aa8 | ||
|
|
9c840feca5 | ||
|
|
a8d9f6ee8a | ||
|
|
0d1cca441c | ||
|
|
15a7546fc6 | ||
|
|
0985778e3e | ||
|
|
a6980f7215 | ||
|
|
a0e93621f1 | ||
|
|
9b37de3ab5 | ||
|
|
80a6b9f92a | ||
|
|
3d4ce94896 | ||
|
|
4e2df6d2c1 | ||
|
|
7935d0d5bf | ||
|
|
842fb41fc3 | ||
|
|
ae47d1679b | ||
|
|
8a72ceb9ac | ||
|
|
217394183d | ||
|
|
77f70c8bdd | ||
|
|
d63cabe395 | ||
|
|
3662c2cc3c | ||
|
|
23b557948b | ||
|
|
d587cd8149 | ||
|
|
64b488c1a2 | ||
|
|
598412cc17 | ||
|
|
3a965ac0f3 | ||
|
|
a86eacc0db | ||
|
|
bb1ded8810 | ||
|
|
c10fe36d55 | ||
|
|
4476680814 | ||
|
|
6f96dd182b | ||
|
|
30749afed7 |
@@ -478,8 +478,8 @@ endif()
|
||||
|
||||
# Hardware dependant options
|
||||
###################################
|
||||
add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4")
|
||||
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
||||
add_list1_option(NB_ANTENNAS_RX "1" "Number of antennas in reception" "1" "2" "4")
|
||||
add_list1_option(NB_ANTENNAS_TX "1" "Number of antennas in transmission" "1" "2" "4")
|
||||
|
||||
set (CONFIG_ROOTDIR ${OPENAIR_DIR}/common/config)
|
||||
add_library(config_internals OBJECT
|
||||
@@ -2051,6 +2051,20 @@ target_link_libraries(nr_prachsim PRIVATE
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common)
|
||||
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_prdchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prdchsim.c)
|
||||
target_link_libraries(nr_prdchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
|
||||
)
|
||||
target_link_libraries(nr_prdchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_pdrchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pdrchsim.c)
|
||||
target_link_libraries(nr_pdrchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
|
||||
)
|
||||
target_link_libraries(nr_pdrchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
|
||||
@@ -304,7 +304,7 @@ function main() {
|
||||
SIMUS_PHY=1
|
||||
CMAKE_CMD="$CMAKE_CMD -DENABLE_PHYSIM_TESTS=ON"
|
||||
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
|
||||
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim"
|
||||
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_prdchsim nr_pdrchsim"
|
||||
echo_info "Will compile dlsim, ulsim, ..."
|
||||
shift;;
|
||||
-V | --vcd)
|
||||
|
||||
@@ -1 +1 @@
|
||||
add_subdirectory(PHY)
|
||||
add_subdirectory(PHY)
|
||||
@@ -117,6 +117,8 @@ typedef struct {
|
||||
} nr_srs_info_t;
|
||||
|
||||
typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS;
|
||||
typedef struct NR_AIOT_DL_FRAME_PARMS NR_AIOT_DL_FRAME_PARMS;
|
||||
typedef struct NR_AIOT_UL_FRAME_PARMS NR_AIOT_UL_FRAME_PARMS;
|
||||
|
||||
typedef uint32_t (*get_samples_per_slot_t)(int slot, const NR_DL_FRAME_PARMS *fp);
|
||||
typedef uint32_t (*get_slot_from_timestamp_t)(openair0_timestamp timestamp_rx, const NR_DL_FRAME_PARMS *fp);
|
||||
@@ -244,6 +246,65 @@ struct NR_DL_FRAME_PARMS {
|
||||
bool print_ue_help_cmdline_log;
|
||||
};
|
||||
|
||||
struct NR_AIOT_DL_FRAME_PARMS {
|
||||
// original NR structure
|
||||
NR_DL_FRAME_PARMS nr_frame_parms;
|
||||
|
||||
// additional AIoT parameters
|
||||
bool Zadoff_Chu; // true -> use Zadoff-Chu sequence, false -> use standard Zadoff-Chu sequence
|
||||
int M; // number of chips in OFDM symbol
|
||||
|
||||
// packet parameters
|
||||
int payload_size; // Payload size in bits
|
||||
int packet_size; // Payload+CRC size in bits
|
||||
int packet_encoded_size; // Manchester encoded payload size in bits
|
||||
int packet_symbols; // number of OFDM symbols in R2D packet
|
||||
int packet_slots; // number of slots in R2D packet
|
||||
int packet_subcarriers; // number of subcarriers in R2D packet
|
||||
int packet_samples; // number of samples in R2D packet (aligned to slots)
|
||||
|
||||
// RX parameters
|
||||
int N; // downsampling factor
|
||||
int received_M; // detected M from R-TAS-CAP
|
||||
int packet_downsampled_samples; // number of downsampled samples in R2D packet
|
||||
int packet_received_symbols; // number of received OFDM symbols
|
||||
int packet_payload_size; // decoded payload size in bits
|
||||
int SIP_samples; // number of samples in R2D preamble
|
||||
};
|
||||
|
||||
struct NR_AIOT_UL_FRAME_PARMS {
|
||||
// original NR structure
|
||||
NR_DL_FRAME_PARMS nr_frame_parms;
|
||||
|
||||
// additional AIoT parameters (TS 38.391 6.2.1.6-1)
|
||||
uint8_t T_bit; // 3 bits, D2R bit duration options
|
||||
bool R_block; // block repetition number - true=2, false=1
|
||||
uint8_t R_SFS; // 3 bits, small frequency shift factor
|
||||
uint8_t I_bit; // 2 bits, the interval in bits for D2R midamble section
|
||||
bool L_preamble; // length of preamble - false=short 7 bits or true=long 31 bits
|
||||
bool I_add; // additional D2R midable insertion indicator - false=absent, true=present
|
||||
bool R_code; // the channel coding indicator - true=FEC, false=No FEC
|
||||
uint8_t size; // the transport block size in bytes
|
||||
|
||||
// packet parameters
|
||||
int N_bit; // number of samples per D2R bit
|
||||
int N_chip; // number of samples per D2R chip
|
||||
int N_preamble; // number of bits in D2R preamble
|
||||
int N_SFS; // value of small frequency shift
|
||||
int N_midamble_space; // number of bits in D2R midamble
|
||||
int payload_size; // decoded payload size in bits
|
||||
int packet_size; // total size of D2R packet in bits
|
||||
int packet_samples; // number of samples in D2R packet
|
||||
int preamble_samples; // number of samples in D2R preamble
|
||||
int midamble_samples; // number of samples in D2R midamble
|
||||
|
||||
// rx parameters
|
||||
double f_min; // minimum frequency shift
|
||||
double f_max; // maximum frequency shift
|
||||
int packet_payload_size; // decoded payload size in bits
|
||||
};
|
||||
|
||||
|
||||
// PRS config structures
|
||||
typedef struct {
|
||||
uint16_t PRSResourceSetPeriod[2]; // [slot period, slot offset] of a PRS resource set
|
||||
|
||||
39
openair1/PHY_AIOT/defs_aiot_common.h
Normal file
39
openair1/PHY_AIOT/defs_aiot_common.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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/defs_aiot_common.h
|
||||
\brief AIOT PHY layer common definitions
|
||||
\author Vojtech Masny
|
||||
\date 2025
|
||||
\version 0.1
|
||||
\company Eurecom
|
||||
\email:
|
||||
\note
|
||||
\warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_DEFS_AIOT_COMMON__H__
|
||||
#define __PHY_DEFS_AIOT_COMMON__H__
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
49
openair1/PHY_AIOT/defs_aiot_d2r.h
Normal file
49
openair1/PHY_AIOT/defs_aiot_d2r.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/defs_aiot_d2r.h
|
||||
\brief AIOT PHY layer D2R definitions
|
||||
\author Vojtech Masny
|
||||
\date 2025
|
||||
\version 0.1
|
||||
\company Eurecom
|
||||
\email:
|
||||
\note
|
||||
\warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_DEFS_AIOT_D2R__H__
|
||||
#define __PHY_DEFS_AIOT_D2R__H__
|
||||
|
||||
// D-TAS preambles in length of 7 and 31 bits
|
||||
#define D_TAS_7_BITS 0x4E
|
||||
#define D_TAS_31_BITS 0x242BB1F3
|
||||
|
||||
#define POSTAMBLE_N 4
|
||||
#define POSTAMBLE 0xF
|
||||
|
||||
const double T_BIT_TABLE[8] = { 2.0, 1.0, 1/2.0, 1/4.0, 1/8.0, 1/16.0, 1/32.0, 1/96.0 };
|
||||
const int I_BIT_TABLE[4] = { 48, 96, 168, 240 };
|
||||
|
||||
#define MAX_AIOT_D2R_PAYLOAD_SIZE 125 // bytes
|
||||
#define MAX_AIOT_D2R_PACKET_SIZE (MAX_AIOT_D2R_PAYLOAD_SIZE + 2)
|
||||
|
||||
#endif
|
||||
54
openair1/PHY_AIOT/defs_aiot_r2d.h
Normal file
54
openair1/PHY_AIOT/defs_aiot_r2d.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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/defs_aiot_R2D.h
|
||||
\brief AIOT PHY layer R2D definitions
|
||||
\author Vojtech Masny
|
||||
\date 2025
|
||||
\version 0.1
|
||||
\company Eurecom
|
||||
\email:
|
||||
\note
|
||||
\warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_DEFS_AIOT_R2D__H__
|
||||
#define __PHY_DEFS_AIOT_R2D__H__
|
||||
|
||||
#define R_TAS_SIP 0xC8
|
||||
#define R_TAS_SIP_N 8
|
||||
#define R_TAS_SIP_M 4
|
||||
|
||||
#define R_TAS_CAP 0xA
|
||||
#define R_TAS_CAP_N 4
|
||||
|
||||
#define R2D_POSTAMBLE 0xF
|
||||
#define R2D_POSTAMBLE_N 4
|
||||
|
||||
#define MAX_AIOT_R2D_PAYLOAD_SIZE 125 // bytes
|
||||
#define MAX_AIOT_R2D_PACKET_SIZE (MAX_AIOT_R2D_PAYLOAD_SIZE + 2) // SIP + CAS + PAYLOAD + POSTAMBLE
|
||||
|
||||
#include "precomputed_SIP.h"
|
||||
#include "precomputed_CAP.h"
|
||||
#include "precomputed_payload.h"
|
||||
#include "precomputed_Postamble.h"
|
||||
|
||||
#endif
|
||||
1267
openair1/PHY_AIOT/precomputed_CAP.h
Normal file
1267
openair1/PHY_AIOT/precomputed_CAP.h
Normal file
File diff suppressed because it is too large
Load Diff
1265
openair1/PHY_AIOT/precomputed_Postamble.h
Normal file
1265
openair1/PHY_AIOT/precomputed_Postamble.h
Normal file
File diff suppressed because it is too large
Load Diff
369
openair1/PHY_AIOT/precomputed_SIP.h
Normal file
369
openair1/PHY_AIOT/precomputed_SIP.h
Normal file
@@ -0,0 +1,369 @@
|
||||
/* Precomputed SIP SCs */
|
||||
|
||||
const c16_t SIP_SCs_ZC_1RBs[24] = {
|
||||
{.r = 16384, .i = 9459},
|
||||
{.r = 8923, .i = -7460},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1999, .i = 7460},
|
||||
{.r = 16384, .i = 9459},
|
||||
{.r = 14920, .i = -10922},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 18382, .i = -1999},
|
||||
{.r = 0, .i = -18918},
|
||||
{.r = -7460, .i = 1999},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -3998, .i = 10922},
|
||||
{.r = 8192, .i = 4730},
|
||||
{.r = 8192, .i = 732},
|
||||
{.r = 5461, .i = 0},
|
||||
{.r = 4730, .i = 2731},
|
||||
{.r = 8192, .i = 4730},
|
||||
{.r = 12921, .i = 1999},
|
||||
{.r = 13653, .i = -4730},
|
||||
{.r = 8192, .i = -10191},
|
||||
{.r = 0, .i = -9459},
|
||||
{.r = -4730, .i = -2731},
|
||||
{.r = -2731, .i = 4730},
|
||||
{.r = 3462, .i = 7460},
|
||||
};
|
||||
|
||||
const c16_t SIP_SCs_ZC_2RBs[48] = {
|
||||
{.r = 15341, .i = 7178},
|
||||
{.r = 4249, .i = -7765},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -2810, .i = 3083},
|
||||
{.r = 8545, .i = 10832},
|
||||
{.r = 10908, .i = -5368},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 7065, .i = 3384},
|
||||
{.r = 10331, .i = -1086},
|
||||
{.r = 5737, .i = -8680},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 11302, .i = -4552},
|
||||
{.r = -2332, .i = -13598},
|
||||
{.r = -6789, .i = -296},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -4818, .i = -1875},
|
||||
{.r = -4225, .i = 9490},
|
||||
{.r = 9224, .i = 4673},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 10717, .i = 6080},
|
||||
{.r = 5108, .i = -12816},
|
||||
{.r = -6945, .i = 1052},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -5072, .i = 10263},
|
||||
{.r = 7670, .i = 3589},
|
||||
{.r = 6007, .i = -1758},
|
||||
{.r = 1132, .i = -1636},
|
||||
{.r = 137, .i = 2947},
|
||||
{.r = 4272, .i = 5416},
|
||||
{.r = 8138, .i = 2770},
|
||||
{.r = 7670, .i = -1126},
|
||||
{.r = 5224, .i = -1840},
|
||||
{.r = 5165, .i = -543},
|
||||
{.r = 7208, .i = -1472},
|
||||
{.r = 7180, .i = -5231},
|
||||
{.r = 3375, .i = -7927},
|
||||
{.r = -1166, .i = -6799},
|
||||
{.r = -3247, .i = -3542},
|
||||
{.r = -3391, .i = -872},
|
||||
{.r = -3347, .i = 1472},
|
||||
{.r = -2113, .i = 4745},
|
||||
{.r = 2275, .i = 6949},
|
||||
{.r = 7670, .i = 4336},
|
||||
{.r = 8399, .i = -2318},
|
||||
{.r = 2554, .i = -6408},
|
||||
{.r = -3998, .i = -2947},
|
||||
{.r = -3879, .i = 4529},
|
||||
{.r = 2595, .i = 7668},
|
||||
};
|
||||
|
||||
const c16_t SIP_SCs_ZC_4RBs[96] = {
|
||||
{.r = 9575, .i = 5931},
|
||||
{.r = 2960, .i = -4766},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -2561, .i = 3200},
|
||||
{.r = 7452, .i = 7465},
|
||||
{.r = 6423, .i = -4454},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1953, .i = 2919},
|
||||
{.r = 8320, .i = 3360},
|
||||
{.r = 6101, .i = -6280},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 6849, .i = 326},
|
||||
{.r = 6555, .i = -5315},
|
||||
{.r = 198, .i = -7457},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 5432, .i = -6327},
|
||||
{.r = -4865, .i = -8051},
|
||||
{.r = -5014, .i = 400},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -4155, .i = -3569},
|
||||
{.r = -6334, .i = 6399},
|
||||
{.r = 4841, .i = 5098},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2943, .i = 6110},
|
||||
{.r = 8981, .i = -1025},
|
||||
{.r = 1446, .i = -6307},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2705, .i = -5983},
|
||||
{.r = -8709, .i = -2286},
|
||||
{.r = -206, .i = 6599},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 751, .i = 7113},
|
||||
{.r = 9405, .i = -188},
|
||||
{.r = 413, .i = -5792},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -1383, .i = -4547},
|
||||
{.r = -6555, .i = 5315},
|
||||
{.r = 6175, .i = 4795},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 7709, .i = 2396},
|
||||
{.r = -1250, .i = -8886},
|
||||
{.r = -3976, .i = 4808},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 473, .i = 9019},
|
||||
{.r = 10191, .i = -2721},
|
||||
{.r = -2975, .i = -3029},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -4333, .i = 5727},
|
||||
{.r = 4787, .i = 2965},
|
||||
{.r = 3863, .i = -903},
|
||||
{.r = 381, .i = -557},
|
||||
{.r = 319, .i = 2880},
|
||||
{.r = 3726, .i = 3733},
|
||||
{.r = 5438, .i = 984},
|
||||
{.r = 3717, .i = -841},
|
||||
{.r = 2436, .i = 483},
|
||||
{.r = 4160, .i = 1680},
|
||||
{.r = 6190, .i = -90},
|
||||
{.r = 5508, .i = -2741},
|
||||
{.r = 3588, .i = -3261},
|
||||
{.r = 3277, .i = -2658},
|
||||
{.r = 3827, .i = -3630},
|
||||
{.r = 2527, .i = -5633},
|
||||
{.r = -447, .i = -5880},
|
||||
{.r = -2432, .i = -4025},
|
||||
{.r = -2707, .i = -2307},
|
||||
{.r = -3044, .i = -1424},
|
||||
{.r = -3862, .i = 293},
|
||||
{.r = -3167, .i = 3200},
|
||||
{.r = -129, .i = 4970},
|
||||
{.r = 3124, .i = 3993},
|
||||
{.r = 4526, .i = 1583},
|
||||
{.r = 4491, .i = -512},
|
||||
{.r = 3876, .i = -2430},
|
||||
{.r = 1929, .i = -4313},
|
||||
{.r = -1639, .i = -4344},
|
||||
{.r = -4354, .i = -1143},
|
||||
{.r = -3403, .i = 3197},
|
||||
{.r = 507, .i = 4975},
|
||||
{.r = 3932, .i = 3181},
|
||||
{.r = 4702, .i = -94},
|
||||
{.r = 3102, .i = -2690},
|
||||
{.r = 79, .i = -3504},
|
||||
{.r = -2965, .i = -1582},
|
||||
{.r = -3277, .i = 2658},
|
||||
{.r = 690, .i = 5485},
|
||||
{.r = 5434, .i = 3018},
|
||||
{.r = 5053, .i = -2657},
|
||||
{.r = -625, .i = -4443},
|
||||
{.r = -4392, .i = 416},
|
||||
{.r = -1090, .i = 5648},
|
||||
{.r = 4746, .i = 4273},
|
||||
{.r = 5096, .i = -1361},
|
||||
{.r = 27, .i = -3002},
|
||||
{.r = -2689, .i = 1379},
|
||||
{.r = 697, .i = 5030},
|
||||
};
|
||||
|
||||
const c16_t SIP_SCs_Ones_1RBs[24] = {
|
||||
{.r = 32767, .i = 0},
|
||||
{.r = 5461, .i = -20381},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 5461, .i = -5461},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 5461, .i = -1463},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 5461, .i = 1463},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 5461, .i = 5461},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 5461, .i = 20381},
|
||||
{.r = 16384, .i = 0},
|
||||
{.r = 12921, .i = -7460},
|
||||
{.r = 5461, .i = -9459},
|
||||
{.r = 0, .i = -5461},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 3462, .i = 1999},
|
||||
{.r = 5461, .i = 0},
|
||||
{.r = 3462, .i = -1999},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 0, .i = 5461},
|
||||
{.r = 5461, .i = 9459},
|
||||
{.r = 12921, .i = 7460},
|
||||
};
|
||||
|
||||
const c16_t SIP_SCs_Ones_2RBs[48] = {
|
||||
{.r = 32767, .i = 0},
|
||||
{.r = 2731, .i = -20741},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = -6592},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = -3559},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = -2095},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = -1131},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = -359},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = 359},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = 1131},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = 2095},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = 3559},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = 6592},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2731, .i = 20741},
|
||||
{.r = 16384, .i = 0},
|
||||
{.r = 11736, .i = -9005},
|
||||
{.r = 2731, .i = -10191},
|
||||
{.r = -1931, .i = -4661},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 3145, .i = -414},
|
||||
{.r = 2731, .i = -2731},
|
||||
{.r = 318, .i = -2413},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1931, .i = 800},
|
||||
{.r = 2731, .i = -732},
|
||||
{.r = 1186, .i = -1545},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1186, .i = 1545},
|
||||
{.r = 2731, .i = 732},
|
||||
{.r = 1931, .i = -800},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 318, .i = 2413},
|
||||
{.r = 2731, .i = 2731},
|
||||
{.r = 3145, .i = 414},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -1931, .i = 4661},
|
||||
{.r = 2731, .i = 10191},
|
||||
{.r = 11736, .i = 9005},
|
||||
};
|
||||
|
||||
const c16_t SIP_SCs_Ones_4RBs[96] = {
|
||||
{.r = 32767, .i = 0},
|
||||
{.r = 1365, .i = -20830},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -6864},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -4022},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -2769},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -2043},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -1557},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -1197},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -912},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -673},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -463},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -272},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = -89},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 89},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 272},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 463},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 673},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 912},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 1197},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 1557},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 2043},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 2769},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 4022},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 6864},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1365, .i = 20830},
|
||||
{.r = 16384, .i = 0},
|
||||
{.r = 11098, .i = -9733},
|
||||
{.r = 1365, .i = -10370},
|
||||
{.r = -2749, .i = -4115},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 2694, .i = -1328},
|
||||
{.r = 1365, .i = -3296},
|
||||
{.r = -702, .i = -2067},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1704, .i = -339},
|
||||
{.r = 1365, .i = -1779},
|
||||
{.r = -96, .i = -1461},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1281, .i = 84},
|
||||
{.r = 1365, .i = -1048},
|
||||
{.r = 227, .i = -1139},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 1019, .i = 346},
|
||||
{.r = 1365, .i = -566},
|
||||
{.r = 451, .i = -914},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 818, .i = 547},
|
||||
{.r = 1365, .i = -180},
|
||||
{.r = 638, .i = -727},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 638, .i = 727},
|
||||
{.r = 1365, .i = 180},
|
||||
{.r = 818, .i = -547},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 451, .i = 914},
|
||||
{.r = 1365, .i = 566},
|
||||
{.r = 1019, .i = -346},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = 227, .i = 1139},
|
||||
{.r = 1365, .i = 1048},
|
||||
{.r = 1281, .i = -84},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -96, .i = 1461},
|
||||
{.r = 1365, .i = 1779},
|
||||
{.r = 1704, .i = 339},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -702, .i = 2067},
|
||||
{.r = 1365, .i = 3296},
|
||||
{.r = 2694, .i = 1328},
|
||||
{.r = 0, .i = 0},
|
||||
{.r = -2749, .i = 4115},
|
||||
{.r = 1365, .i = 10370},
|
||||
{.r = 11098, .i = 9733},
|
||||
};
|
||||
|
||||
const c16_t *SIP_SCs_select(int RBs, bool ZC_Ones) {
|
||||
switch (RBs) {
|
||||
case 1:
|
||||
return ZC_Ones ? SIP_SCs_ZC_1RBs : SIP_SCs_Ones_1RBs;
|
||||
case 2:
|
||||
return ZC_Ones ? SIP_SCs_ZC_2RBs : SIP_SCs_Ones_2RBs;
|
||||
case 4:
|
||||
return ZC_Ones ? SIP_SCs_ZC_4RBs : SIP_SCs_Ones_4RBs;
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown N_PRB");
|
||||
}
|
||||
}
|
||||
|
||||
1923
openair1/PHY_AIOT/precomputed_payload.h
Normal file
1923
openair1/PHY_AIOT/precomputed_payload.h
Normal file
File diff suppressed because it is too large
Load Diff
1544
openair1/SIMULATION/NR_PHY/pdrchsim.c
Normal file
1544
openair1/SIMULATION/NR_PHY/pdrchsim.c
Normal file
File diff suppressed because it is too large
Load Diff
1734
openair1/SIMULATION/NR_PHY/prdchsim.c
Normal file
1734
openair1/SIMULATION/NR_PHY/prdchsim.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -173,8 +173,10 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des
|
||||
}
|
||||
#endif
|
||||
|
||||
struct complexd cexp_doppler[length];
|
||||
cd_t *cexp_doppler = NULL;
|
||||
|
||||
if (desc->max_Doppler != 0.0) {
|
||||
cexp_doppler = malloc(length * sizeof(cd_t));
|
||||
get_cexp_doppler(cexp_doppler, desc, length);
|
||||
}
|
||||
|
||||
@@ -225,6 +227,100 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des
|
||||
|
||||
} // ii
|
||||
} // i
|
||||
|
||||
if (cexp_doppler != NULL) {
|
||||
free(cexp_doppler);
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__ ((no_sanitize_address)) multipath_channel_MT(channel_desc_t *desc,
|
||||
double *tx_sig_re[NB_ANTENNAS_TX],
|
||||
double *tx_sig_im[NB_ANTENNAS_TX],
|
||||
double *rx_sig_re[NB_ANTENNAS_RX],
|
||||
double *rx_sig_im[NB_ANTENNAS_RX],
|
||||
uint32_t length,
|
||||
uint8_t keep_channel,
|
||||
int log_channel,
|
||||
gaussZiggurat_MT_t *gz)
|
||||
{
|
||||
double path_loss = pow(10,desc->path_loss_dB/20);
|
||||
uint64_t dd = desc->channel_offset;
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
printf("[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %lu, len %d \n",
|
||||
keep_channel, path_loss, desc->path_loss_dB, desc->nb_rx, desc->nb_tx, dd, desc->channel_length);
|
||||
#endif
|
||||
|
||||
if (keep_channel) {
|
||||
// do nothing - keep channel
|
||||
} else {
|
||||
random_channel_MT(desc,0, gz);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
for (l = 0; l<(int)desc->channel_length; l++) {
|
||||
printf("ch[%i] = (%f, %f)\n", l, desc->ch[0][l].r, desc->ch[0][l].i);
|
||||
}
|
||||
#endif
|
||||
|
||||
cd_t *cexp_doppler = NULL;
|
||||
|
||||
if (desc->max_Doppler != 0.0) {
|
||||
cexp_doppler = malloc(length * sizeof(cd_t));
|
||||
get_cexp_doppler(cexp_doppler, desc, length);
|
||||
}
|
||||
|
||||
for (int i=0; i<((int)length-dd); i++) {
|
||||
for (int ii=0; ii<desc->nb_rx; ii++) {
|
||||
struct complexd rx_tmp={0};
|
||||
for (int j=0; j<desc->nb_tx; j++) {
|
||||
struct complexd *chan=desc->ch[ii+(j*desc->nb_rx)];
|
||||
for (int l = 0; l<(int)desc->channel_length; l++) {
|
||||
if ((i>=0) && (i-l)>=0) {
|
||||
struct complexd tx;
|
||||
tx.r = tx_sig_re[j][i-l];
|
||||
tx.i = tx_sig_im[j][i-l];
|
||||
rx_tmp.r += (tx.r * chan[l].r) - (tx.i * chan[l].i);
|
||||
rx_tmp.i += (tx.i * chan[l].r) + (tx.r * chan[l].i);
|
||||
}
|
||||
#if 0
|
||||
if (i==0 && log_channel == 1) {
|
||||
printf("channel[%d][%d][%d] = %f dB \t(%e, %e)\n",
|
||||
ii, j, l, 10 * log10(pow(chan[l].r, 2.0) + pow(chan[l].i, 2.0)), chan[l].r, chan[l].i);
|
||||
}
|
||||
#endif
|
||||
} //l
|
||||
} // j
|
||||
#if 0
|
||||
if (desc->max_Doppler != 0.0)
|
||||
rx_tmp = cdMul(rx_tmp, cexp_doppler[i]);
|
||||
#endif
|
||||
|
||||
#ifdef DOPPLER_DEBUG
|
||||
printf("[k %2i] cexp_doppler = (%7.4f, %7.4f), abs(cexp_doppler) = %.4f\n",
|
||||
i,
|
||||
cexp_doppler[i].r,
|
||||
cexp_doppler[i].i,
|
||||
sqrt(cexp_doppler[i].r * cexp_doppler[i].r + cexp_doppler[i].i * cexp_doppler[i].i));
|
||||
#endif
|
||||
|
||||
rx_sig_re[ii][i+dd] = rx_tmp.r*path_loss;
|
||||
rx_sig_im[ii][i+dd] = rx_tmp.i*path_loss;
|
||||
#ifdef DEBUG_CH
|
||||
if ((i%32)==0) {
|
||||
printf("rx aa %d: %f, %f => %e, %e\n",
|
||||
ii, rx_tmp.r, rx_tmp.i, rx_sig_re[ii][i-dd], rx_sig_im[ii][i-dd]);
|
||||
}
|
||||
#endif
|
||||
//rx_sig_re[ii][i] = sqrt(.5)*(tx_sig_re[0][i] + tx_sig_re[1][i]);
|
||||
//rx_sig_im[ii][i] = sqrt(.5)*(tx_sig_im[0][i] + tx_sig_im[1][i]);
|
||||
|
||||
} // ii
|
||||
} // i
|
||||
|
||||
if (cexp_doppler != NULL) {
|
||||
free(cexp_doppler);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -61,3 +61,38 @@ void add_noise(c16_t **rxdata,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helper to clip double to int16 range
|
||||
static int16_t saturate_c16(double in) {
|
||||
if (in > 32767.0) return 32767;
|
||||
if (in < -32768.0) return -32768;
|
||||
return (int16_t)in;
|
||||
}
|
||||
|
||||
void add_noise_MT(c16_t **rxdata,
|
||||
const double **r_re,
|
||||
const double **r_im,
|
||||
const double sigma,
|
||||
const int length,
|
||||
const int slot_offset,
|
||||
const double ts,
|
||||
const int delay,
|
||||
const uint16_t pdu_bit_map,
|
||||
const uint16_t ptrs_bit_map,
|
||||
const uint8_t nb_antennas_rx,
|
||||
gaussZiggurat_MT_t *gz)
|
||||
{
|
||||
double A = sqrt(sigma / 2);
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
for (int ap = 0; ap < nb_antennas_rx; ap++) {
|
||||
c16_t *rxd = &rxdata[ap][slot_offset + i + delay];
|
||||
rxd->r = saturate_c16(r_re[ap][i] + A * gaussZiggurat_MT(0.0, 1.0, gz)); // convert to fixed point
|
||||
rxd->i = saturate_c16(r_im[ap][i] + A * gaussZiggurat_MT(0.0, 1.0, gz));
|
||||
/* Add phase noise if enabled */
|
||||
if (pdu_bit_map & ptrs_bit_map) {
|
||||
phase_noise(ts, &rxdata[ap][slot_offset + i + delay].r, &rxdata[ap][slot_offset + i + delay].i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -205,6 +205,88 @@ double __attribute__ ((no_sanitize("address", "undefined"))) gaussZiggurat(doubl
|
||||
return hz != INT32_MIN && abs(hz) < kn[iz] ? hz * wn[iz] : nfix();
|
||||
}
|
||||
|
||||
// **********************************************
|
||||
// Modified gaussZiggurat to allow multithreading
|
||||
// **********************************************
|
||||
|
||||
#define SHR3_MT (gz->jz = gz->jsr, gz->jsr ^= (gz->jsr << 13), gz->jsr ^= (gz->jsr >> 17), gz->jsr ^= (gz->jsr << 5), gz->jz + gz->jsr)
|
||||
#define UNI_MT (0.5 + (signed)SHR3_MT * 0.2328306e-9)
|
||||
|
||||
double nfix_MT(gaussZiggurat_MT_t *gz)
|
||||
{
|
||||
const double r = 3.442620;
|
||||
|
||||
for (;;) {
|
||||
/* use per-instance x,y stored in gz */
|
||||
gz->x = gz->hz * gz->wn[gz->iz];
|
||||
|
||||
if (gz->iz == 0) {
|
||||
do {
|
||||
gz->x = -0.2904764 * log(UNI_MT);
|
||||
gz->y = -log(UNI_MT);
|
||||
} while (gz->y + gz->y < gz->x * gz->x);
|
||||
|
||||
return (gz->hz > 0) ? r + gz->x : -r - gz->x;
|
||||
}
|
||||
|
||||
if (gz->fn[gz->iz] + UNI_MT * (gz->fn[gz->iz - 1] - gz->fn[gz->iz]) < exp(-0.5 * gz->x * gz->x)) {
|
||||
return gz->x;
|
||||
}
|
||||
|
||||
gz->hz = SHR3_MT;
|
||||
gz->iz = gz->hz & 127;
|
||||
|
||||
if (abs(gz->hz) < gz->kn[gz->iz]) {
|
||||
return ((gz->hz) * gz->wn[gz->iz]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!Procedure to create tables for normal distribution kn,wn and fn. */
|
||||
void tableNor_MT(unsigned long seed, gaussZiggurat_MT_t *gz)
|
||||
{
|
||||
gz->jsr = seed;
|
||||
double dn = 3.442619855899;
|
||||
const double m1 = 2147483648.0;
|
||||
double q;
|
||||
double tn = 3.442619855899;
|
||||
const double vn = 9.91256303526217E-03;
|
||||
|
||||
q = vn / exp(-0.5 * dn * dn);
|
||||
gz->kn[0] = ((dn / q) * m1);
|
||||
gz->kn[1] = 0;
|
||||
gz->wn[0] = (q / m1);
|
||||
gz->wn[127] = (dn / m1);
|
||||
gz->fn[0] = 1.0;
|
||||
gz->fn[127] = (exp(-0.5 * dn * dn));
|
||||
|
||||
for (int i = 126; 1 <= i; i--) {
|
||||
dn = sqrt(-2.0 * log(vn / dn + exp(-0.5 * dn * dn)));
|
||||
gz->kn[i + 1] = ((dn / tn) * m1);
|
||||
tn = dn;
|
||||
gz->fn[i] = (exp(-0.5 * dn * dn));
|
||||
gz->wn[i] = (dn / m1);
|
||||
}
|
||||
gz->tableNordDone=true;
|
||||
return;
|
||||
}
|
||||
|
||||
double __attribute__ ((no_sanitize("address", "undefined"))) gaussZiggurat_MT(double mean, double variance, gaussZiggurat_MT_t *gz)
|
||||
{
|
||||
if (!gz->tableNordDone) {
|
||||
gz->jsr = 123456789;
|
||||
gz->iset = 0; /* initialize Box–Muller state */
|
||||
/* let's make reasonable constant tables */
|
||||
unsigned long seed;
|
||||
fill_random(&seed, sizeof(seed));
|
||||
tableNor_MT(seed, gz);
|
||||
}
|
||||
|
||||
gz->hz = SHR3_MT;
|
||||
gz->iz = gz->hz & 127;
|
||||
return gz->hz != INT32_MIN && abs(gz->hz) < gz->kn[gz->iz] ? gz->hz * gz->wn[gz->iz] : nfix_MT(gz);
|
||||
}
|
||||
|
||||
#ifdef MAIN
|
||||
main(int argc,char **argv)
|
||||
{
|
||||
|
||||
@@ -50,6 +50,7 @@ typedef enum {
|
||||
#define CHANMODEL_FREE_RSQRT_6 1<<1
|
||||
#define CHANMODEL_FREE_RSQRT_NTAPS 1<<2
|
||||
#define CHANMODEL_FREE_AMPS 1<<3
|
||||
#define CHANMODEL_FREE_RSQRT_CHAN 1<<4
|
||||
#define SHR3 (jz = jsr, jsr ^= (jsr << 13), jsr ^= (jsr >> 17), jsr ^= (jsr << 5), jz + jsr)
|
||||
|
||||
typedef enum {
|
||||
@@ -333,6 +334,23 @@ typedef struct {
|
||||
double ru_amp[NUMBER_OF_RU_MAX];
|
||||
} sim_t;
|
||||
|
||||
// Ambient IoT addition (multithreaded simulation)
|
||||
typedef struct {
|
||||
double wn[128], fn[128];
|
||||
uint32_t iz, jz, jsr, kn[128];
|
||||
int32_t hz;
|
||||
|
||||
/* Box–Muller state moved from static locals in nfix_MT */
|
||||
int iset; /* 0/1 toggles availability of gset */
|
||||
double gset; /* second normal variate from Box–Muller */
|
||||
double x; /* temporary used in nfix_MT */
|
||||
double y;
|
||||
|
||||
bool tableNordDone;
|
||||
} gaussZiggurat_MT_t;
|
||||
|
||||
double gaussZiggurat_MT(double mean, double variance, gaussZiggurat_MT_t *gz);
|
||||
|
||||
channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
|
||||
uint8_t nb_rx,
|
||||
SCM_t channel_model,
|
||||
@@ -347,6 +365,21 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
|
||||
double path_loss_dB,
|
||||
float noise_power_dB);
|
||||
|
||||
channel_desc_t *new_channel_desc_scm_MT(uint8_t nb_tx,
|
||||
uint8_t nb_rx,
|
||||
SCM_t channel_model,
|
||||
double sampling_rate,
|
||||
uint64_t center_freq,
|
||||
double channel_bandwidth,
|
||||
double DS_TDL,
|
||||
double maxDoppler,
|
||||
const corr_level_t corr_level,
|
||||
double forgetting_factor,
|
||||
uint64_t channel_offset,
|
||||
double path_loss_dB,
|
||||
float noise_power_dB,
|
||||
gaussZiggurat_MT_t *gz);
|
||||
|
||||
channel_desc_t *find_channel_desc_fromname( char *modelname );
|
||||
|
||||
|
||||
@@ -390,6 +423,7 @@ void get_cexp_doppler(struct complexd *cexp_doppler, channel_desc_t *chan_desc,
|
||||
\param desc Pointer to the channel descriptor
|
||||
*/
|
||||
int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
|
||||
int random_channel_MT(channel_desc_t *desc, uint8_t abstraction_flag, gaussZiggurat_MT_t *gz);
|
||||
|
||||
/**\fn void multipath_channel(channel_desc_t *desc,
|
||||
double tx_sig_re[NB_ANTENNAS_TX],
|
||||
@@ -419,6 +453,16 @@ void multipath_channel(channel_desc_t *desc,
|
||||
uint32_t length,
|
||||
uint8_t keep_channel,
|
||||
int log_channel);
|
||||
|
||||
void multipath_channel_MT(channel_desc_t *desc,
|
||||
double *tx_sig_re[NB_ANTENNAS_TX],
|
||||
double *tx_sig_im[NB_ANTENNAS_TX],
|
||||
double *rx_sig_re[NB_ANTENNAS_RX],
|
||||
double *rx_sig_im[NB_ANTENNAS_RX],
|
||||
uint32_t length,
|
||||
uint8_t keep_channel,
|
||||
int log_channel,
|
||||
gaussZiggurat_MT_t *gz);
|
||||
/*
|
||||
\fn double compute_pbch_sinr(channel_desc_t *desc,
|
||||
channel_desc_t *desc_i1,
|
||||
@@ -589,6 +633,19 @@ void add_noise(c16_t **rxdata,
|
||||
const uint16_t ptrs_bit_map,
|
||||
const uint8_t nb_antennas_rx);
|
||||
|
||||
void add_noise_MT(c16_t **rxdata,
|
||||
const double **r_re,
|
||||
const double **r_im,
|
||||
const double sigma,
|
||||
const int length,
|
||||
const int slot_offset,
|
||||
const double ts,
|
||||
const int delay,
|
||||
const uint16_t pdu_bit_map,
|
||||
const uint16_t ptrs_bit_map,
|
||||
const uint8_t nb_antennas_rx,
|
||||
gaussZiggurat_MT_t *gz);
|
||||
|
||||
void do_DL_sig(sim_t *sim,
|
||||
uint16_t subframe,
|
||||
uint32_t offset,
|
||||
|
||||
35
openairinterface5g.code-workspace
Normal file
35
openairinterface5g.code-workspace
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"files.associations": {
|
||||
"chrono": "c",
|
||||
"algorithm": "c",
|
||||
"format": "c",
|
||||
"precomputed_sip.h": "c",
|
||||
"precomputed_cas.h": "c",
|
||||
"precomputed_payload.h": "c",
|
||||
"precomputed_postamble.h": "c",
|
||||
"vector": "c",
|
||||
"load_module_shlib.h": "c",
|
||||
"signal.h": "c",
|
||||
"tools_defs.h": "c",
|
||||
"defs_aiot_ue.h": "c",
|
||||
"nr_unitary_defs.h": "c",
|
||||
"defs_aiot_gnb.h": "c",
|
||||
"random": "c",
|
||||
"cmath": "c",
|
||||
"complex": "c",
|
||||
"compare": "c",
|
||||
"cstdint": "c",
|
||||
"precomputed_cap.h": "c",
|
||||
"valarray": "c",
|
||||
"defs_aiot_r2d.h": "c",
|
||||
"time.h": "c",
|
||||
"rf.h": "c"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user