mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-18 15:10:29 +00:00
Compare commits
4 Commits
pre-commit
...
old-push-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dee52d4efc | ||
|
|
2349c7d1ad | ||
|
|
e44377f7cb | ||
|
|
7fabd9c65e |
@@ -367,6 +367,8 @@ void init_gNB_Tpool(int inst) {
|
||||
// ULSCH decoder result FIFO
|
||||
initNotifiedFIFO(&gNB->respPuschSymb);
|
||||
initNotifiedFIFO(&gNB->respDecode);
|
||||
// PUSCH channel estimation result FIFO
|
||||
initNotifiedFIFO(&gNB->respPuschAarx);
|
||||
|
||||
// L1 RX result FIFO
|
||||
initNotifiedFIFO(&gNB->resp_L1);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -536,6 +536,7 @@ typedef struct PHY_VARS_gNB_s {
|
||||
time_stats_t ulsch_ldpc_decoding_stats;
|
||||
time_stats_t ulsch_deinterleaving_stats;
|
||||
time_stats_t ulsch_channel_estimation_stats;
|
||||
time_stats_t pusch_channel_estimation_antenna_processing_stats;
|
||||
time_stats_t ulsch_llr_stats;
|
||||
time_stats_t rx_srs_stats;
|
||||
time_stats_t generate_srs_stats;
|
||||
@@ -546,6 +547,7 @@ typedef struct PHY_VARS_gNB_s {
|
||||
time_stats_t srs_beam_report_stats;
|
||||
time_stats_t srs_iq_matrix_stats;
|
||||
|
||||
notifiedFIFO_t respPuschAarx;
|
||||
notifiedFIFO_t respPuschSymb;
|
||||
notifiedFIFO_t respDecode;
|
||||
notifiedFIFO_t resp_L1;
|
||||
@@ -555,7 +557,10 @@ typedef struct PHY_VARS_gNB_s {
|
||||
notifiedFIFO_t L1_rx_out;
|
||||
notifiedFIFO_t resp_RU_tx;
|
||||
tpool_t threadPool;
|
||||
int nbSymb;
|
||||
int nbAarx;
|
||||
int num_pusch_symbols_per_thread;
|
||||
int dmrs_num_antennas_per_thread;
|
||||
pthread_t L1_rx_thread;
|
||||
int L1_rx_thread_core;
|
||||
pthread_t L1_tx_thread;
|
||||
@@ -578,6 +583,34 @@ union puschSymbolReqUnion {
|
||||
uint64_t p;
|
||||
};
|
||||
|
||||
typedef struct puschAntennaProc_s {
|
||||
PHY_VARS_gNB *gNB;
|
||||
unsigned char Ns;
|
||||
int nl;
|
||||
unsigned short p;
|
||||
unsigned char symbol;
|
||||
int ul_id;
|
||||
unsigned short bwp_start_subcarrier;
|
||||
int aarx;
|
||||
int numAntennas;
|
||||
nfapi_nr_pusch_pdu_t *pusch_pdu;
|
||||
int *max_ch;
|
||||
c16_t *pilot;
|
||||
int *nest_count;
|
||||
uint64_t *noise_amp2;
|
||||
delay_t *delay;
|
||||
} puschAntennaProc_t;
|
||||
|
||||
struct puschAntennaReqId {
|
||||
uint16_t ul_id;
|
||||
uint16_t spare;
|
||||
} __attribute__((packed));
|
||||
|
||||
union puschAntennaReqUnion {
|
||||
struct puschAntennaReqId s;
|
||||
uint64_t p;
|
||||
};
|
||||
|
||||
typedef struct LDPCDecode_s {
|
||||
PHY_VARS_gNB *gNB;
|
||||
NR_UL_gNB_HARQ_t *ulsch_harq;
|
||||
|
||||
@@ -214,6 +214,7 @@ int main(int argc, char *argv[])
|
||||
int params_from_file = 0;
|
||||
int threadCnt=0;
|
||||
int max_ldpc_iterations = 5;
|
||||
int num_antennas_per_thread = 1;
|
||||
if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) {
|
||||
exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
|
||||
}
|
||||
@@ -224,7 +225,7 @@ int main(int argc, char *argv[])
|
||||
/* initialize the sin-cos table */
|
||||
InitSinLUT();
|
||||
|
||||
while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:A:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) {
|
||||
|
||||
/* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */
|
||||
/* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */
|
||||
@@ -395,6 +396,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
num_antennas_per_thread = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
input_fd = fopen(optarg, "r");
|
||||
if (input_fd == NULL) {
|
||||
@@ -512,6 +517,7 @@ int main(int argc, char *argv[])
|
||||
printf("-w Start PRB for PUSCH\n");
|
||||
printf("-y Number of TX antennas used at UE\n");
|
||||
printf("-z Number of RX antennas used at gNB\n");
|
||||
printf("-A Number of antennas per thread for PUSCH channel estimation\n");
|
||||
printf("-C Specify the number of threads for the simulation\n");
|
||||
printf("-E {SRS: [0] Disabled, [1] Enabled} e.g. -E 1\n");
|
||||
printf("-F Input filename (.txt format) for RX conformance testing\n");
|
||||
@@ -559,6 +565,7 @@ int main(int argc, char *argv[])
|
||||
gNB = RC.gNB[0];
|
||||
gNB->ofdm_offset_divisor = UINT_MAX;
|
||||
gNB->num_pusch_symbols_per_thread = 1;
|
||||
gNB->dmrs_num_antennas_per_thread = num_antennas_per_thread;
|
||||
gNB->RU_list[0] = calloc(1, sizeof(**gNB->RU_list));
|
||||
gNB->RU_list[0]->rfdevice.openair0_cfg = openair0_cfg;
|
||||
|
||||
@@ -566,6 +573,7 @@ int main(int argc, char *argv[])
|
||||
initNotifiedFIFO(&gNB->respDecode);
|
||||
|
||||
initNotifiedFIFO(&gNB->respPuschSymb);
|
||||
initNotifiedFIFO(&gNB->respPuschAarx);
|
||||
initNotifiedFIFO(&gNB->L1_tx_free);
|
||||
initNotifiedFIFO(&gNB->L1_tx_filled);
|
||||
initNotifiedFIFO(&gNB->L1_tx_out);
|
||||
@@ -950,6 +958,7 @@ int main(int argc, char *argv[])
|
||||
reset_meas(&gNB->rx_pusch_symbol_processing_stats);
|
||||
reset_meas(&gNB->ulsch_decoding_stats);
|
||||
reset_meas(&gNB->ulsch_channel_estimation_stats);
|
||||
reset_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
|
||||
reset_meas(&gNB->rx_srs_stats);
|
||||
reset_meas(&gNB->generate_srs_stats);
|
||||
reset_meas(&gNB->get_srs_signal_stats);
|
||||
@@ -1507,6 +1516,7 @@ int main(int argc, char *argv[])
|
||||
printDistribution(&gNB->phy_proc_rx,table_rx, "Total PHY proc rx");
|
||||
printStatIndent(&gNB->rx_pusch_stats, "RX PUSCH time");
|
||||
printStatIndent2(&gNB->ulsch_channel_estimation_stats, "ULSCH channel estimation time");
|
||||
printStatIndent3(&gNB->pusch_channel_estimation_antenna_processing_stats, "Antenna Processing time");
|
||||
printStatIndent2(&gNB->rx_pusch_init_stats, "RX PUSCH Initialization time");
|
||||
printStatIndent2(&gNB->rx_pusch_symbol_processing_stats, "RX PUSCH Symbol Processing time");
|
||||
printStatIndent(&gNB->ulsch_decoding_stats,"ULSCH total decoding time");
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
#define HLP_L1TX_BO "Backoff from full-scale output at the L1 entity(frequency domain), ex. 12 would corresponding to 14-bit input level (6 dB/bit). Default 36 dBFS for OAI RU entity"
|
||||
#define CONFIG_STRING_L1_PHASE_COMP "phase_compensation"
|
||||
#define HLP_L1_PHASE_COMP "Apply NR symbolwise phase rotation"
|
||||
#define CONFIG_STRING_NUM_ANTENNAS_PER_THREAD "dmrs_num_antennas_per_thread"
|
||||
#define HLP_NUM_ARX "Number of antennas per thread for PUSCH channel estimation"
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* L1 configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -84,6 +86,7 @@
|
||||
{CONFIG_STRING_L1_TX_THREAD_CORE, NULL, 0, .uptr=NULL, .defintval=-1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_TX_AMP_BACKOFF_dB, HLP_L1TX_BO,0, .uptr=NULL, .defintval=36, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_PHASE_COMP, HLP_L1_PHASE_COMP,PARAMFLAG_BOOL, .uptr=NULL,.defintval=1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_NUM_ANTENNAS_PER_THREAD, HLP_NUM_ARX,0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
#define L1_CC_IDX 0
|
||||
@@ -105,6 +108,7 @@
|
||||
#define L1_TX_THREAD_CORE 16
|
||||
#define L1_TX_AMP_BACKOFF_dB 17
|
||||
#define L1_PHASE_COMP 18
|
||||
#define NUM_ANTENNAS_PER_THREAD 19
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
@@ -865,6 +865,7 @@ void RCconfig_NR_L1(void)
|
||||
RC.gNB[j]->max_ldpc_iterations = *(L1_ParamList.paramarray[j][L1_MAX_LDPC_ITERATIONS].uptr);
|
||||
RC.gNB[j]->L1_rx_thread_core = *(L1_ParamList.paramarray[j][L1_RX_THREAD_CORE].iptr);
|
||||
RC.gNB[j]->L1_tx_thread_core = *(L1_ParamList.paramarray[j][L1_TX_THREAD_CORE].iptr);
|
||||
RC.gNB[j]->dmrs_num_antennas_per_thread = *(L1_ParamList.paramarray[j][NUM_ANTENNAS_PER_THREAD].uptr);
|
||||
LOG_I(PHY,"L1_RX_THREAD_CORE %d (%d)\n",*(L1_ParamList.paramarray[j][L1_RX_THREAD_CORE].iptr),L1_RX_THREAD_CORE);
|
||||
RC.gNB[j]->TX_AMP = (int16_t)(32767.0 / pow(10.0, .05 * (double)(*L1_ParamList.paramarray[j][L1_TX_AMP_BACKOFF_dB].uptr)));
|
||||
RC.gNB[j]->phase_comp = *L1_ParamList.paramarray[j][L1_PHASE_COMP].uptr;
|
||||
|
||||
Reference in New Issue
Block a user