Commit 80c40c36 authored by Wang Tsu-Han's avatar Wang Tsu-Han

annotation fixes and naming change for logical antenna port

parent e19385a5
......@@ -145,7 +145,7 @@ int nr_beam_precoding(int32_t **txdataF,
int slot,
int symbol,
int aa,
int nb_antenna_ports)
int nb_logical_ports)
{
......@@ -154,7 +154,7 @@ int nr_beam_precoding(int32_t **txdataF,
// clear txdata_BF[aa][re] for each call of ue_spec_beamforming
memset(&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size));
for (p=0; p<nb_antenna_ports; p++) {
for (p=0; p<nb_logical_ports; p++) {
if ((frame_parms->L_ssb >> p) & 0x01) {
multadd_cpx_vector((int16_t*)&txdataF[p][symbol*frame_parms->ofdm_symbol_size],
(int16_t*)beam_weights[p][aa],
......
......@@ -101,7 +101,7 @@ int nr_beam_precoding(int32_t **txdataF,
int slot,
int symbol,
int aa,
int nb_antenna_ports
int nb_logical_ports
);
#endif
......@@ -170,22 +170,21 @@ typedef struct RU_prec_t_s{
} RU_prec_t;
typedef struct RU_feptx_t_s{
/// \internal This variable is protected by \ref mutex_feptx_prec
/// \internal This variable is protected by \ref mutex_feptx
int instance_cnt_feptx;
/// pthread struct for RU TX FEP PREC worker thread
/// pthread struct for RU TX FEP thread
pthread_t pthread_feptx;
/// pthread attributes for worker feptx prec thread
/// pthread attributes for feptx thread
pthread_attr_t attr_feptx;
/// condition varible for RU TX FEP PREC thread
/// condition varible for RU TX FEP thread
pthread_cond_t cond_feptx;
/// mutex for fep PREC TX worker thread
/// mutex for fep TX thread
pthread_mutex_t mutex_feptx;
struct RU_t_s *ru;
int aa;//physical MAX nb_tx
int half_slot;//first or second half of a slot
int aa;//number of physical antenna port (MAX nb_tx)
int slot;//current slot
int symbol;//current symbol
int nb_antenna_ports;//number of logical port
int nb_logical_ports;//number of logical antenna port (MAX Lmax)
int index;
}RU_feptx_t;
......
......@@ -126,6 +126,7 @@ typedef struct {
} NR_DL_gNB_HARQ_t;
typedef struct {
/// Pointers to 16 HARQ processes for the DLSCH
NR_DL_gNB_HARQ_t *harq_processes[NR_MAX_NB_HARQ_PROCESSES];
......
......@@ -121,14 +121,14 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
int slot = tti_tx;
int i = 0;
int j = 0;
int aa = 0;
int p = 0;
int ret = 0;
int nb_antenna_ports = fp->N_ssb;
int nb_logical_ports = fp->N_ssb;
int ofdm_mask_full = (1<<(ru->nb_tx*2))-1;
if (nr_slot_select(cfg,slot) == SF_UL) return;
for (aa=0; aa<fp->Lmax; aa++) {
memset(ru->common.txdataF[aa],0,fp->samples_per_slot_wCP*sizeof(int32_t));
for (p=0; p<fp->Lmax; p++) {
memset(ru->common.txdataF[p],0,fp->samples_per_slot_wCP*sizeof(int32_t));
}
for(j=0; j<fp->symbols_per_slot; ++j){
......@@ -139,7 +139,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
gNB = ru->gNB_list[0];
cfg = &gNB->gNB_config;
for(i=0; i<nb_antenna_ports; ++i){
for(i=0; i<nb_logical_ports; ++i){
memcpy((void*)&ru->common.txdataF[i][j*fp->ofdm_symbol_size],
(void*)&gNB->common_vars.txdataF[i][j*fp->ofdm_symbol_size + ((tti_tx%2)*fp->samples_per_slot_wCP)],
fp->ofdm_symbol_size*sizeof(int32_t));
......@@ -164,7 +164,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
feptx[i].ru = ru;
feptx[i].symbol = j;
feptx[i].slot = slot;
feptx[i].nb_antenna_ports = nb_antenna_ports;
feptx[i].nb_logical_ports = nb_logical_ports;
feptx[i].instance_cnt_feptx = 0;
AssertFatal(pthread_cond_signal(&feptx[i].cond_feptx) == 0,"ERROR pthread_cond_signal for feptx_ofdm_thread\n");
AssertFatal((ret=pthread_mutex_unlock(&feptx[i].mutex_feptx))==0,"mutex_lock returns %d\n",ret);
......@@ -179,7 +179,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
feptx[i+ru->nb_tx].ru = ru;
feptx[i+ru->nb_tx].symbol = j;
feptx[i+ru->nb_tx].slot = slot;
feptx[i+ru->nb_tx].nb_antenna_ports = nb_antenna_ports;
feptx[i+ru->nb_tx].nb_logical_ports = nb_logical_ports;
feptx[i+ru->nb_tx].instance_cnt_feptx = 0;
AssertFatal(pthread_cond_signal(&feptx[i+ru->nb_tx].cond_feptx) == 0,"ERROR pthread_cond_signal for feptx_ofdm_thread\n");
AssertFatal((ret=pthread_mutex_unlock(&feptx[i+ru->nb_tx].mutex_feptx))==0,"mutex_lock returns %d\n",ret);
......@@ -215,7 +215,7 @@ static void *nr_feptx_thread(void *param) {
RU_feptx_t *feptx = (RU_feptx_t *)param;
RU_t *ru;
int aa, slot, start, l, nb_antenna_ports, ret;
int aa, slot, start, l, nb_logical_ports, ret;
int32_t ***bw;
NR_DL_FRAME_PARMS *fp;
int ofdm_mask_full;
......@@ -233,7 +233,7 @@ static void *nr_feptx_thread(void *param) {
l = feptx->symbol;
fp = ru->nr_frame_parms;
start = feptx->symbol;
nb_antenna_ports = feptx->nb_antenna_ports;
nb_logical_ports = feptx->nb_logical_ports;
ofdm_mask_full = (1<<(ru->nb_tx*2))-1;
......@@ -258,7 +258,7 @@ static void *nr_feptx_thread(void *param) {
slot,
l,
aa,
nb_antenna_ports);
nb_logical_ports);
}
stop_meas(&ru->precoding_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC , 0);
......
......@@ -150,7 +150,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
int frame,int slot,
int do_meas) {
int aa;
int p;
uint8_t num_dci=0,num_pdsch_rnti;
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
......@@ -158,6 +158,9 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
uint8_t ssb_frame_periodicity; // every how many frames SSB are generated
int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP;
num_dci = gNB->pdcch_vars.num_dci;
num_pdsch_rnti = gNB->pdcch_vars.num_pdsch_rnti;
if (cfg->sch_config.ssb_periodicity.value < 20)
ssb_frame_periodicity = 1;
else
......@@ -170,8 +173,8 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if (do_meas==1) start_meas(&gNB->phy_proc_tx);
// clear the transmit data array for the current subframe
for (aa=0; aa<fp->Lmax; aa++) {
memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
for (p=0; p<fp->Lmax; p++) {
memset(&gNB->common_vars.txdataF[p][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,1);
......@@ -181,8 +184,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,0);
num_dci = gNB->pdcch_vars.num_dci;
num_pdsch_rnti = gNB->pdcch_vars.num_pdsch_rnti;
if (num_dci) {
LOG_D(PHY, "[gNB %d] Frame %d slot %d \
......
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