mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-14 21:20:30 +00:00
Compare commits
2 Commits
pre-commit
...
L1_TX_leve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a81f4cb1c | ||
|
|
f9543b3a9f |
@@ -520,7 +520,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
AssertFatal(pdcch_dmrs!=NULL, "NR init: pdcch_dmrs malloc failed\n");
|
||||
|
||||
gNB->bad_pucch = 0;
|
||||
|
||||
if (gNB->TX_AMP == 0) gNB->TX_AMP = AMP;
|
||||
// ceil(((NB_RB<<1)*3)/32) // 3 RE *2(QPSK)
|
||||
int pdcch_dmrs_init_length = (((fp->N_RB_DL<<1)*3)>>5)+1;
|
||||
|
||||
|
||||
@@ -146,8 +146,9 @@ void nr_modulation(uint32_t *in,
|
||||
case 2:
|
||||
nr_mod_table128 = (__m128i*) nr_qpsk_byte_mod_table;
|
||||
out128 = (__m128i*) out;
|
||||
for (i=0; i<length/8; i++)
|
||||
for (i=0; i<length/8; i++)
|
||||
out128[i] = nr_mod_table128[in_bytes[i]];
|
||||
|
||||
// the bits that are left out
|
||||
i = i*8/2;
|
||||
nr_mod_table32 = (int32_t*) nr_qpsk_mod_table;
|
||||
|
||||
@@ -47,7 +47,7 @@ void nr_generate_modulation_table() {
|
||||
for (i=0; i<4; i++) {
|
||||
nr_qpsk_mod_table[i*2] = (short)(1-2*(i&1))*val*sqrt2*sqrt2;
|
||||
nr_qpsk_mod_table[i*2+1] = (short)(1-2*((i>>1)&1))*val*sqrt2*sqrt2;
|
||||
//printf("%d j%d\n",nr_qpsk_mod_table[i*2],nr_qpsk_mod_table[i*2+1]);
|
||||
//printf("QPSK : %d j%d\n",nr_qpsk_mod_table[i*2],nr_qpsk_mod_table[i*2+1]);
|
||||
}
|
||||
|
||||
#if defined(__SSE2__)
|
||||
@@ -57,7 +57,6 @@ void nr_generate_modulation_table() {
|
||||
for (j=0; j<4; j++) {
|
||||
table[i*8+(j*2)] = (short)(1-2*((i>>(j*2))&1))*val*sqrt2*sqrt2;
|
||||
table[i*8+(j*2)+1] = (short)(1-2*((i>>(j*2+1))&1))*val*sqrt2*sqrt2;
|
||||
//printf("%d j%d\n",nr_qpsk_byte_mod_table[i*8+(j*2)],nr_qpsk_byte_mod_table[i*8+(j*2)+1]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -68,7 +67,7 @@ void nr_generate_modulation_table() {
|
||||
for (j=0; j<2; j++) {
|
||||
table[i*4+(j*2)] = (short)((1-2*((i>>(j*4))&1))*(2-(1-2*((i>>(j*4+2))&1))))*val*sqrt10*sqrt2;
|
||||
table[i*4+(j*2)+1] = (short)((1-2*((i>>(j*4+1))&1))*(2-(1-2*((i>>(j*4+3))&1))))*val*sqrt10*sqrt2;
|
||||
//printf("%d j%d\n",nr_16qam_byte_mod_table[i*4+(j*2)],nr_16qam_byte_mod_table[i*4+(j*2)+1]);
|
||||
//printf("%d j%d\n",nr_16qam_byte_mod_table[i*4+(j*2)],nr_16qam_byte_mod_table[i*4+(j*2)+1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +75,7 @@ void nr_generate_modulation_table() {
|
||||
for (i=0; i<16; i++) {
|
||||
table[i*2] = (short)((1-2*(i&1))*(2-(1-2*((i>>2)&1))))*val*sqrt10*sqrt2;
|
||||
table[i*2+1] = (short)((1-2*((i>>1)&1))*(2-(1-2*((i>>3)&1))))*val*sqrt10*sqrt2;
|
||||
//printf("%d j%d\n",table[i*2],table[i*2+1]);
|
||||
// printf("%d j%d\n",table[i*2],table[i*2+1]);
|
||||
}
|
||||
|
||||
//64QAM
|
||||
|
||||
@@ -60,7 +60,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
||||
PHY_VARS_gNB *gNB = msgTx->gNB;
|
||||
NR_gNB_DLSCH_t *dlsch;
|
||||
int32_t** txdataF = gNB->common_vars.txdataF;
|
||||
int16_t amp = AMP;
|
||||
int16_t amp = gNB->TX_AMP;
|
||||
int xOverhead = 0;
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
time_stats_t *dlsch_encoding_stats=&gNB->dlsch_encoding_stats;
|
||||
|
||||
@@ -765,6 +765,8 @@ typedef struct PHY_VARS_gNB_s {
|
||||
uint8_t pbch_configured;
|
||||
char gNB_generate_rar;
|
||||
|
||||
// reference amplitude for TX
|
||||
int16_t TX_AMP;
|
||||
// PUCCH0 Look-up table for cyclic-shifts
|
||||
NR_gNB_PUCCH0_LUT_t pucch0_lut;
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#define CONFIG_STRING_L1_PRACH_DTX_THRESHOLD "prach_dtx_threshold"
|
||||
#define CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD "pusch_dtx_threshold"
|
||||
#define CONFIG_STRING_L1_MAX_LDPC_ITERATIONS "max_ldpc_iterations"
|
||||
#define CONFIG_STRING_L1_TX_AMP_BACKOFF_dB "tx_amp_backoff_dB"
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* L1 configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -72,6 +73,7 @@
|
||||
{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:150, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_MAX_LDPC_ITERATIONS, NULL, 0, uptr:NULL, defintval:5, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_L1_TX_AMP_BACKOFF_dB, NULL, 0, uptr:NULL, defintval:36, TYPE_UINT, 0}, \
|
||||
}
|
||||
#define L1_CC_IDX 0
|
||||
#define L1_TRANSPORT_N_PREFERENCE_IDX 1
|
||||
@@ -88,6 +90,7 @@
|
||||
#define L1_PRACH_DTX_THRESHOLD 12
|
||||
#define L1_PUSCH_DTX_THRESHOLD 13
|
||||
#define L1_MAX_LDPC_ITERATIONS 14
|
||||
#define L1_TX_AMP_BACKOFF_dB 15
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
@@ -729,6 +729,9 @@ void RCconfig_NR_L1(void) {
|
||||
RC.gNB[j]->prach_thres = *(L1_ParamList.paramarray[j][L1_PRACH_DTX_THRESHOLD].uptr);
|
||||
RC.gNB[j]->pusch_thres = *(L1_ParamList.paramarray[j][L1_PUSCH_DTX_THRESHOLD].uptr);
|
||||
RC.gNB[j]->max_ldpc_iterations = *(L1_ParamList.paramarray[j][L1_MAX_LDPC_ITERATIONS].uptr);
|
||||
RC.gNB[j]->TX_AMP = (int16_t)(32767.0/pow(10.0,.05*(double)(*L1_ParamList.paramarray[j][L1_TX_AMP_BACKOFF_dB].uptr)));
|
||||
LOG_I(PHY,"TX_AMP = %d (-%d dBFS)\n",RC.gNB[j]->TX_AMP,*L1_ParamList.paramarray[j][L1_TX_AMP_BACKOFF_dB].uptr);
|
||||
AssertFatal(RC.gNB[j]->TX_AMP > 300,"TX_AMP is too small\n");
|
||||
RC.gNB[j]->num_ulprbbl = num_prbbl;
|
||||
RC.gNB[j]->ap_N1 = N1;
|
||||
RC.gNB[j]->ap_N2 = N2;
|
||||
|
||||
Reference in New Issue
Block a user