Commit b4adedc9 authored by xiangwan's avatar xiangwan

update

parent 82c32481
......@@ -540,10 +540,14 @@ const char* eurecomFunctionsNames[] = {
"pss_synchro_nr",
"pss_search_time_nr",
"nr_initial_ue_sync",
"zz_00_ru_rx",
"zz_01_ru_rx_process1_fh_south_in",
"zz_02_ru_rx_process2_front_end",
"zz_03_ru_rx_process3_prach",
"zz_03_ru_rx_process3_prach_1",
"zz_03_ru_rx_process3_prach_2",
"zz_04_ru_rx_process4_wakeup_gnb_l1s",
"zz_30_ru_tx",
"zz_31_ru_tx_process1_front_end",
......@@ -552,10 +556,12 @@ const char* eurecomFunctionsNames[] = {
"zz_10_l1_rx",
"zz_11_l1_rx_process1_indication",
"zz_12_l1_rx_process2_prach",
"zz_12_l1_rx_process2_rotation",
"zz_13_l1_rx_process3_phy_procedure",
"zz_14_l1_rx_process4_wakeup_tx",
"zz_20_l1_tx",
"zz_21_l1_tx_process1_phy_procedure",
"zz_21_l1_tx_process1_phy_procedure_rotation",
"zz_22_l1_tx_process2_wakeup_txfh",
"beam_switching_gpio"
};
......
......@@ -537,6 +537,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS1_FH_SOUTH_IN,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH_1,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH_2,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS1_FRONT_END,
......@@ -545,10 +547,12 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS1_INDICATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_PRACH,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_ROTATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS4_WAKEUP_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE_ROTATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS2_WAKEUP_TXFH,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,
......
......@@ -73,7 +73,7 @@ typedef struct {
} T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (286)
#define VCD_NUM_FUNCTIONS (290)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (187)
......
......@@ -3547,6 +3547,16 @@ ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS3_PRACH
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_03_ru_rx_process3_prach
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS3_PRACH_1
DESC = VCD function ZZ_RU_RX_PROCESS3_PRACH_1
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_03_ru_rx_process3_prach_1
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS3_PRACH_2
DESC = VCD function ZZ_RU_RX_PROCESS3_PRACH_2
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_03_ru_rx_process3_prach_2
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
DESC = VCD function ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
GROUP = ALL:VCD:UE:VCD_FUNCTION
......@@ -3587,6 +3597,11 @@ ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS2_PRACH
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_12_l1_rx_process2_prach
ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS2_ROTATION
DESC = VCD function ZZ_L1_RX_PROCESS2_ROTATION
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_12_l1_rx_process2_rotation
ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
DESC = VCD function ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
GROUP = ALL:VCD:UE:VCD_FUNCTION
......@@ -3607,6 +3622,11 @@ ID = VCD_FUNCTION_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_21_l1_tx_process1_phy_procedure
ID = VCD_FUNCTION_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE_ROTATION
DESC = VCD function ZZ_L1_TX_PROCESS1_PHY_PROCEDURE_ROTATION
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_21_l1_tx_process1_phy_procedure_rotation
ID = VCD_FUNCTION_ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
DESC = VCD function ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
GROUP = ALL:VCD:UE:VCD_FUNCTION
......
......@@ -262,6 +262,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
// Do PRACH RU processing
L1_nr_prach_procedures(gNB,frame_rx,slot_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_PRACH,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_ROTATION,1);
//apply the rx signal rotation here
apply_nr_rotation_ul(&gNB->frame_parms,
gNB->common_vars.rxdataF[0],
......@@ -269,6 +270,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
0,
gNB->frame_parms.Ncp==EXTENDED?12:14,
gNB->frame_parms.ofdm_symbol_size);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_ROTATION,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE,1);
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE,0);
......
......@@ -1586,18 +1586,20 @@ void *ru_thread( void *param ) {
// adjust for timing offset between RU
//printf("~~~~~~~~~~~~~~~~~~~~~~~~~~%d.%d in ru_thread is in process\n", proc->frame_rx, proc->tti_rx);
if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END,1);
// do RX front-end processing (frequency-shift, dft) if needed
int slot_type = nr_slot_select(cfg,proc->frame_rx,proc->tti_rx);
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
//if (proc->tti_rx==8) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END,1);
if (ru->feprx) {
ru->feprx(ru,proc->tti_rx);
//LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END,0);
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
LOG_D(PHY,"Copying rxdataF from RU to gNB\n");
......@@ -1605,10 +1607,11 @@ void *ru_thread( void *param ) {
for (aa=0;aa<ru->nb_rx;aa++)
memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa],
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END,0);
// Do PRACH RU processing
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH,1);
int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST);
uint8_t prachStartSymbol,N_dur;
if (prach_id>=0) {
N_dur = get_nr_prach_duration(ru->prach_list[prach_id].fmt);
......@@ -1629,7 +1632,6 @@ void *ru_thread( void *param ) {
for (int prach_oc = 0; prach_oc<ru->prach_list[prach_id].num_prach_ocas; prach_oc++) {
prachStartSymbol = ru->prach_list[prach_id].prachStartSymbol+prach_oc*N_dur;
//comment FK: the standard 38.211 section 5.3.2 has one extra term +14*N_RA_slot. This is because there prachStartSymbol is given wrt to start of the 15kHz slot or 60kHz slot. Here we work slot based, so this function is anyway only called in slots where there is PRACH. Its up to the MAC to schedule another PRACH PDU in the case there are there N_RA_slot \in {0,1}.
rx_nr_prach_ru(ru,
ru->prach_list[prach_id].fmt, //could also use format
ru->prach_list[prach_id].numRA,
......
......@@ -205,10 +205,11 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE_ROTATION,1);
//apply the OFDM symbol rotation here
apply_nr_rotation(fp,(int16_t*) &gNB->common_vars.txdataF[0][txdataF_offset],slot,0,fp->Ncp==EXTENDED?12:14,fp->ofdm_symbol_size);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE_ROTATION,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment