Commit cb873a97 authored by 111's avatar 111

add interfere

parent 70aa9221
...@@ -52,6 +52,8 @@ uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,25 ...@@ -52,6 +52,8 @@ uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,25
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
int32_t pss_tmp_data[4096];
static int log_first =0;
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu) { void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu) {
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
...@@ -62,6 +64,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ ...@@ -62,6 +64,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
int txdataF_offset = slot*fp->samples_per_slot_wCP; int txdataF_offset = slot*fp->samples_per_slot_wCP;
uint16_t slots_per_hf = (fp->slots_per_frame)>>1; uint16_t slots_per_hf = (fp->slots_per_frame)>>1;
if (slot<slots_per_hf) if (slot<slots_per_hf)
n_hf=0; n_hf=0;
else else
...@@ -84,6 +87,13 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ ...@@ -84,6 +87,13 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
nr_generate_pss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); nr_generate_pss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_sss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); nr_generate_sss(&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
if (log_first == 0)
{
memcpy(pss_tmp_data,&txdataF[0][txdataF_offset+ssb_start_symbol*fp->ofdm_symbol_size], fp->ofdm_symbol_size*4);
log_first = 1;
}
if (fp->Lmax == 4) if (fp->Lmax == 4)
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp); nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index&7],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
else else
...@@ -132,6 +142,15 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, ...@@ -132,6 +142,15 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,1);
// clear the transmit data array and beam index for the current slot // clear the transmit data array and beam index for the current slot
if (log_first == 1)
{
for (int i=0; i<fp->Lmax; i++) {
if (msgTx->ssb[i].active) {
msgTx->ssb[i].active = false;
}
}
return;
}
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) { for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t)); memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
memset(&gNB->common_vars.beam_id[aa][slot*fp->symbols_per_slot],255,fp->symbols_per_slot*sizeof(uint8_t)); memset(&gNB->common_vars.beam_id[aa][slot*fp->symbols_per_slot],255,fp->symbols_per_slot*sizeof(uint8_t));
...@@ -152,6 +171,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, ...@@ -152,6 +171,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
} }
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,1);
for (int i=0; i<fp->Lmax; i++) { for (int i=0; i<fp->Lmax; i++) {
if (msgTx->ssb[i].active) { if (msgTx->ssb[i].active) {
...@@ -160,8 +180,23 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, ...@@ -160,8 +180,23 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
} }
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,0);
for (int sl = 0; sl < 20;sl++)
{
txdataF_offset = sl*fp->samples_per_slot_wCP;
for (int symb= 0; symb < 14; symb+=2)
{
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
memcpy(&gNB->common_vars.txdataF[aa][txdataF_offset + symb*fp->ofdm_symbol_size],
pss_tmp_data,
fp->samples_per_slot_wCP*sizeof(int32_t));
}
}
}
return;
int num_pdcch_pdus = msgTx->num_ul_pdcch + msgTx->num_dl_pdcch; int num_pdcch_pdus = msgTx->num_ul_pdcch + msgTx->num_dl_pdcch;
if (num_pdcch_pdus > 0) { if (num_pdcch_pdus > 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