Commit b7b48fd6 authored by Raymond Knopp's avatar Raymond Knopp

beamforming debugging after fronthaul testing

parent c3b93285
......@@ -781,13 +781,13 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t*));
common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t*));
LOG_D(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB);
LOG_I(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB);
for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
if (i<fp->nb_antenna_ports_eNB || i==5) {
common_vars->txdataF[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
LOG_D(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n",
LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n",
i,common_vars->txdataF[i],
fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
}
......
......@@ -56,24 +56,25 @@ int beam_precoding(int32_t **txdataF,
int32_t **txdataF_BF,
int subframe,
LTE_DL_FRAME_PARMS *frame_parms,
int32_t ***beam_weights,
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15],
int symbol,
int aa,
int p)
int p,
int l1_id)
{
LOG_D(PHY,"Starting precoding for symbol %d, physical antenna %d, logical port %d\n",symbol,aa,p);
int rb_offset_neg0 = frame_parms->ofdm_symbol_size - (6*frame_parms->N_RB_DL);
int rb_offset_neg = (subframe*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti) + rb_offset_neg0;
int rb_offset_pos = (subframe*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti);
multadd_cpx_vector((int16_t*)&txdataF[p][rb_offset_neg+(symbol*frame_parms->ofdm_symbol_size)],
(int16_t*)&beam_weights[p][aa][rb_offset_neg0],
(int16_t*)&beam_weights[l1_id][p][aa][rb_offset_neg0],
(int16_t*)&txdataF_BF[aa][rb_offset_neg0+(symbol*frame_parms->ofdm_symbol_size)],
0,
6*frame_parms->N_RB_DL,
15);
multadd_cpx_vector((int16_t*)&txdataF[p][rb_offset_pos+(symbol*frame_parms->ofdm_symbol_size)],
(int16_t*)&beam_weights[p][aa][0],
(int16_t*)&beam_weights[l1_id][p][aa][0],
(int16_t*)&txdataF_BF[aa][(symbol*frame_parms->ofdm_symbol_size)],
0,
7*frame_parms->N_RB_DL, // to allow for extra RE at the end, 12 useless multipy-adds (first one at DC and 11 at end)
......@@ -85,7 +86,7 @@ int beam_precoding(int32_t **txdataF,
int beam_precoding_one_eNB(int32_t **txdataF,
int32_t **txdataF_BF,
int32_t ***beam_weights,
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15],
int subframe,
int nb_antenna_ports,
int nb_tx, // total physical antenna
......@@ -112,7 +113,7 @@ int beam_precoding_one_eNB(int32_t **txdataF,
for (symbol=0; symbol<symbols_per_tti; symbol++){
multadd_cpx_vector((int16_t*)&txdataF[p][symbol*ofdm_symbol_size+re_offset],
(int16_t*)beam_weights[p][aa],
(int16_t*)beam_weights[0][p][aa],
(int16_t*)&txdataF_BF[aa][symbol*ofdm_symbol_size],
0,
ofdm_symbol_size,
......
......@@ -46,15 +46,18 @@ after beamforming
antenna element and each carrier
@param slot Slot number
@param symbol Symbol index on which to act
@param aa physical antenna index*/
@param aa physical antenna index
@param p logical antenna index
@param l1_id L1 instance id*/
int beam_precoding(int32_t **txdataF,
int32_t **txdataF_BF,
int submframe,
int subframe,
LTE_DL_FRAME_PARMS *frame_parms,
int32_t ***beam_weights,
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15],
int symbol,
int aa,
int p);
int p,
int l1_id);
/** \brief This function performs beamforming precoding for common
* data for only one eNB, fdragon
......@@ -69,12 +72,11 @@ antenna element and each carrier
@param aa physical antenna index*/
int beam_precoding_one_eNB(int32_t **txdataF,
int32_t **txdataF_BF,
int32_t ***beam_weights,
int subframe,
int nb_antenna_ports,
int nb_tx, // total physical antenna
LTE_DL_FRAME_PARMS *frame_parms
);
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15],
int subframe,
int nb_antenna_ports,
int nb_tx, // total physical antenna
LTE_DL_FRAME_PARMS *frame_parms);
int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs);
......
......@@ -579,10 +579,8 @@ typedef struct {
/// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **rxdataF;
/// \brief holds the transmit data in the frequency domain.
/// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //?
/// - first index: eNB id [0..2] (hard coded)
/// - second index: tx antenna [0..14[ where 14 is the total supported antenna ports.
/// - third index: sample [0..]
/// - first index: tx antenna [0..14[ where 14 is the total supported antenna ports.
/// - second index: sample [0..]
int32_t **txdataF;
} LTE_eNB_COMMON;
......
......@@ -406,13 +406,10 @@ void feptx_ofdm(RU_t *ru) {
void feptx_prec(RU_t *ru) {
// Theoni's
int l,i,aa,rb,p;
int l,i,aa,p;
int subframe = ru->proc.subframe_tx;
PHY_VARS_eNB **eNB_list = ru->eNB_list,*eNB;
LTE_DL_FRAME_PARMS *fp;
int32_t ***bw;
RU_proc_t *proc = &ru->proc;
/* fdragon
int l,i,aa;
......@@ -422,7 +419,6 @@ void feptx_prec(RU_t *ru) {
int subframe = ru->proc.subframe_tx;
*/
if (ru->idx != 0) return;
if (ru->num_eNB == 1) {
......@@ -430,6 +426,8 @@ void feptx_prec(RU_t *ru) {
fp = &eNB->frame_parms;
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[subframe&1];
if (subframe_select(fp,subframe) == SF_UL) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+ru->idx , 1);
for (aa=0;aa<ru->nb_tx;aa++) {
......@@ -443,10 +441,7 @@ void feptx_prec(RU_t *ru) {
#else
if (p<fp->nb_antenna_ports_eNB) {
// pdcch region, copy entire signal from txdataF->txdataF_BF (bf_mask = 1)
// else do beamforming for pdcch according to beam_weights
// to be updated for eMBMS (p=4)
// For the moment this does nothing different than below.
// For the moment this does nothing different than below, except ignore antenna ports 5,7,8.
for (l=0;l<pdcch_vars->num_pdcch_symbols;l++)
beam_precoding(eNB->common_vars.txdataF,
ru->common.txdataF_BF,
......@@ -455,7 +450,8 @@ void feptx_prec(RU_t *ru) {
ru->beam_weights,
l,
aa,
p);
p,
eNB->Mod_id);
} //if (p<fp->nb_antenna_ports_eNB)
// PDSCH region
......@@ -468,7 +464,8 @@ void feptx_prec(RU_t *ru) {
ru->beam_weights,
l,
aa,
p);
p,
eNB->Mod_id);
} // for (l=pdcch_vars ....)
} // if (p<fp->nb_antenna_ports_eNB) ...
#endif //NO_PRECODING
......@@ -511,7 +508,6 @@ void feptx_prec(RU_t *ru) {
for (i=0;i<ru->num_eNB;i++) {
eNB = eNB_list[i];
fp = &eNB->frame_parms;
bw = ru->beam_weights[i];
for (l=0;l<fp->symbols_per_tti;l++) {
for (aa=0;aa<ru->nb_tx;aa++) {
......@@ -519,10 +515,11 @@ void feptx_prec(RU_t *ru) {
ru->common.txdataF_BF,
subframe,
fp,
bw,
ru->beam_weights,
subframe<<1,
l,
aa);
aa,
eNB->Mod_id);
}
}
}
......
......@@ -1194,7 +1194,6 @@ void wakeup_eNBs(RU_t *ru) {
}
else {
LOG_I(PHY,"ru->num_eNB:%d\n", ru->num_eNB);
for (i=0;i<ru->num_eNB;i++)
......@@ -1474,10 +1473,10 @@ static void* ru_thread_tx( void* param ) {
if (oai_exit) break;
LOG_I(PHY,"ru_thread_tx: Waiting for TX processing\n");
LOG_D(PHY,"ru_thread_tx: Waiting for TX processing\n");
// wait until eNBs are finished subframe RX n and TX n+4
wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
LOG_I(PHY,"ru_thread_tx: Woken from condition\n");
LOG_D(PHY,"ru_thread_tx: Woken from condition\n");
if (oai_exit) break;
// do TX front-end processing if needed (precoding and/or IDFTs)
......
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