Commit ba1f969b authored by Florian Kaltenberger's avatar Florian Kaltenberger

changed scaling of rx_pdcch (was not working well for 2 rx antennas)

oaisim parameter -y is now UE rx antennas
minor fixes to unitary sims
parent 58523405
...@@ -1754,7 +1754,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars, ...@@ -1754,7 +1754,7 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs,avgP[(aarx<<1)+aatx]); avgs = cmax(avgs,avgP[(aarx<<1)+aatx]);
log2_maxh = (log2_approx(avgs)/2) + 6 + frame_parms->nb_antennas_rx - 1; log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx;
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
LOG_I(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs); LOG_I(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs);
#endif #endif
......
...@@ -56,69 +56,7 @@ ...@@ -56,69 +56,7 @@
PHY_VARS_eNB *PHY_vars_eNB; PHY_VARS_eNB *PHY_vars_eNB;
PHY_VARS_UE *PHY_vars_UE; PHY_VARS_UE *PHY_vars_UE;
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,lte_frame_type_t frame_type, uint16_t Nid_cell,uint8_t tdd_config,
uint8_t N_RB_DL,uint8_t osf,uint32_t perfect_ce)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
srand(1);
randominit(1);
set_taus_seed(1);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->Nid_cell_mbsfn = 1;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->phich_config_common.phich_resource = oneSixth;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
dump_frame_parms(lte_frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=2;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
lte_gold_mbsfn(lte_frame_parms,PHY_vars_UE->lte_gold_mbsfn_table,Nid_cell);
lte_gold_mbsfn(lte_frame_parms,PHY_vars_eNB->lte_gold_mbsfn_table,Nid_cell);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
PHY_vars_UE->perfect_ce = perfect_ce;
printf("Done lte_param_init\n");
}
DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_1E[2]; DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_1E[2];
#define UL_RB_ALLOC 0x1ff; #define UL_RB_ALLOC 0x1ff;
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2) #define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
...@@ -315,7 +253,7 @@ int main(int argc, char **argv) ...@@ -315,7 +253,7 @@ int main(int argc, char **argv)
if (transmission_mode==2) if (transmission_mode==2)
n_tx=2; n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce); lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,0,osf,perfect_ce);
......
...@@ -340,7 +340,7 @@ int main(int argc, char **argv) ...@@ -340,7 +340,7 @@ int main(int argc, char **argv)
if (transmission_mode>=2) if (transmission_mode>=2)
n_tx=2; n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,N_RB_DL,osf); lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,3,N_RB_DL,0,osf,0);
PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB)); PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB)); PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB));
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include "LAYER2/MAC/vars.h" #include "LAYER2/MAC/vars.h"
#include "OCG_vars.h" #include "OCG_vars.h"
#ifdef XFORMS #ifdef XFORMS
#include "PHY/TOOLS/lte_phy_scope.h" #include "PHY/TOOLS/lte_phy_scope.h"
#endif #endif
...@@ -931,8 +930,8 @@ int main(int argc, char **argv) ...@@ -931,8 +930,8 @@ int main(int argc, char **argv)
} }
if (n_frames==1) if (n_frames==1)
printf("dci %d: rnti 0x%x, format %d, L %d, nCCE %d/%d dci_length %d\n",i,DCI_pdu.dci_alloc[i].rnti, DCI_pdu.dci_alloc[i].format, printf("dci %d: rnti 0x%x, format %d, L %d (aggreg %d), nCCE %d/%d dci_length %d\n",i,DCI_pdu.dci_alloc[i].rnti, DCI_pdu.dci_alloc[i].format,
DCI_pdu.dci_alloc[i].L, DCI_pdu.dci_alloc[i].firstCCE, numCCE, DCI_pdu.dci_alloc[i].dci_length); DCI_pdu.dci_alloc[i].L, 1<<DCI_pdu.dci_alloc[i].L, DCI_pdu.dci_alloc[i].firstCCE, numCCE, DCI_pdu.dci_alloc[i].dci_length);
if (DCI_pdu.dci_alloc[i].firstCCE==-1) if (DCI_pdu.dci_alloc[i].firstCCE==-1)
exit(-1); exit(-1);
......
...@@ -434,7 +434,9 @@ typedef struct eNB_RRC_INST_s { ...@@ -434,7 +434,9 @@ typedef struct eNB_RRC_INST_s {
#endif #endif
//RRC configuration //RRC configuration
#if defined(ENABLE_ITTI)
RrcConfigurationReq configuration; RrcConfigurationReq configuration;
#endif
} eNB_RRC_INST; } eNB_RRC_INST;
#define MAX_UE_CAPABILITY_SIZE 255 #define MAX_UE_CAPABILITY_SIZE 255
......
...@@ -135,7 +135,7 @@ eNBs = ...@@ -135,7 +135,7 @@ eNBs =
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.70"; mme_ip_address = ( { ipv4 = "192.168.12.171";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
......
...@@ -228,6 +228,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -228,6 +228,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t abstraction_flag, uint8_t abstraction_flag,
int nb_antennas_rx, int nb_antennas_rx,
int nb_antennas_tx, int nb_antennas_tx,
int nb_antennas_rx_ue,
uint8_t eMBMS_active_state) uint8_t eMBMS_active_state)
{ {
...@@ -291,7 +292,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -291,7 +292,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
(frame_parms[CC_id])->nb_antennas_tx = 1; (frame_parms[CC_id])->nb_antennas_tx = 1;
(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx; (frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx_ue;
PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag); PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag);
......
...@@ -56,4 +56,5 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs], ...@@ -56,4 +56,5 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
uint8_t abstraction_flag, uint8_t abstraction_flag,
int nb_antennas_rx, int nb_antennas_rx,
int nb_antennas_tx, int nb_antennas_tx,
int nb_antennas_rx_ue,
uint8_t eMBMS_active_state); uint8_t eMBMS_active_state);
...@@ -243,10 +243,13 @@ help (void) ...@@ -243,10 +243,13 @@ help (void)
#else #else
printf ("-W [Rohde&Schwarz SMBV100A functions disabled. Recompile with SMBV=1]\n"); printf ("-W [Rohde&Schwarz SMBV100A functions disabled. Recompile with SMBV=1]\n");
#endif #endif
printf ("-x Set the transmission mode (1,2,5,6 supported for now)\n"); printf ("-x deprecated. Set the transmission mode in config file!\n");
printf ("-y Set the number of receive antennas at the UE (1 or 2)\n");
printf ("-Y Set the global log verbosity (none, low, medium, high, full) \n"); printf ("-Y Set the global log verbosity (none, low, medium, high, full) \n");
printf ("-z Set the cooperation flag (0 for no cooperation, 1 for delay diversity and 2 for distributed alamouti\n"); printf ("-z Set the cooperation flag (0 for no cooperation, 1 for delay diversity and 2 for distributed alamouti\n");
printf ("-Z Reserved\n"); printf ("-Z Reserved\n");
printf ("--xforms Activate the grapical scope\n");
#if T_TRACER #if T_TRACER
printf ("--T_port [port] use given port\n"); printf ("--T_port [port] use given port\n");
printf ("--T_nowait don't wait for tracer, start immediately\n"); printf ("--T_nowait don't wait for tracer, start immediately\n");
...@@ -1142,7 +1145,7 @@ l2l1_task (void *args_p) ...@@ -1142,7 +1145,7 @@ l2l1_task (void *args_p)
stop_meas (&oaisim_stats_f); stop_meas (&oaisim_stats_f);
} //end of slot } //end of slot
if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0) if ((frame >= 12) && (frame <= 12) && (abstraction_flag == 0)
#ifdef PROC #ifdef PROC
&&(Channel_Flag==0) &&(Channel_Flag==0)
#endif #endif
...@@ -1155,22 +1158,42 @@ l2l1_task (void *args_p) ...@@ -1155,22 +1158,42 @@ l2l1_task (void *args_p)
PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti
* 10, * 10,
1, 1); 1, 1);
sprintf (fname, "eNBtxsig%d.m", frame % MAX_FRAME_NUMBER); sprintf (fname, "eNBtxsig0_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txs%d", frame % MAX_FRAME_NUMBER); sprintf (vname, "txs0_%d", frame % MAX_FRAME_NUMBER);
write_output (fname, write_output (fname,
vname, vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdata[0][0], PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdata[0][0],
PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti
* 10, * 10,
1, 1); 1, 1);
sprintf (fname, "eNBtxsigF%d.m", frame % MAX_FRAME_NUMBER); if (PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx>1) {
sprintf (vname, "txsF%d", frame % MAX_FRAME_NUMBER); sprintf (fname, "eNBtxsig1_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txs1_%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdata[0][0],
PHY_vars_UE_g[0][0]->lte_frame_parms.samples_per_tti
* 10,
1, 1);
}
sprintf (fname, "eNBtxsigF0_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txsF0_%d", frame % MAX_FRAME_NUMBER);
write_output (fname, write_output (fname,
vname, vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdataF[0][0], PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdataF[0][0],
PHY_vars_eNB_g[0][0]->lte_frame_parms.symbols_per_tti PHY_vars_eNB_g[0][0]->lte_frame_parms.symbols_per_tti
* PHY_vars_eNB_g[0][0]->lte_frame_parms.ofdm_symbol_size, * PHY_vars_eNB_g[0][0]->lte_frame_parms.ofdm_symbol_size*10,
1, 1); 1, 1);
if (PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx>1) {
sprintf (fname, "eNBtxsigF1_%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "txsF1_%d", frame % MAX_FRAME_NUMBER);
write_output (fname,
vname,
PHY_vars_eNB_g[0][0]->lte_eNB_common_vars.txdataF[0][1],
PHY_vars_eNB_g[0][0]->lte_frame_parms.symbols_per_tti
* PHY_vars_eNB_g[0][0]->lte_frame_parms.ofdm_symbol_size *10,
1, 1);
}
sprintf (fname, "UErxsig%d.m", frame % MAX_FRAME_NUMBER); sprintf (fname, "UErxsig%d.m", frame % MAX_FRAME_NUMBER);
sprintf (vname, "rxs%d", frame % MAX_FRAME_NUMBER); sprintf (vname, "rxs%d", frame % MAX_FRAME_NUMBER);
write_output (fname, write_output (fname,
......
...@@ -100,7 +100,7 @@ int if_times = 0; ...@@ -100,7 +100,7 @@ int if_times = 0;
int for_times = 0; int for_times = 0;
uint16_t Nid_cell = 0; //needed by init_lte_vars uint16_t Nid_cell = 0; //needed by init_lte_vars
int nb_antennas_rx = 2; // // int nb_antennas_rx_ue = 1; // //
uint8_t target_dl_mcs = 16; // max mcs used by MAC scheduler uint8_t target_dl_mcs = 16; // max mcs used by MAC scheduler
uint8_t rate_adaptation_flag = 0; uint8_t rate_adaptation_flag = 0;
uint8_t set_snr = 0; uint8_t set_snr = 0;
...@@ -750,9 +750,9 @@ void get_simulation_options(int argc, char *argv[]) ...@@ -750,9 +750,9 @@ void get_simulation_options(int argc, char *argv[])
break; break;
case 'y': case 'y':
nb_antennas_rx=atoi(optarg); nb_antennas_rx_ue=atoi(optarg);
if (nb_antennas_rx>4) { if (nb_antennas_rx_ue>4) {
printf("Cannot have more than 4 antennas\n"); printf("Cannot have more than 4 antennas\n");
exit(-1); exit(-1);
} }
...@@ -972,7 +972,8 @@ void init_openair1(void) ...@@ -972,7 +972,8 @@ void init_openair1(void)
enb_properties->properties[0]->nb_antenna_ports[CC_id], enb_properties->properties[0]->nb_antenna_ports[CC_id],
abstraction_flag, abstraction_flag,
enb_properties->properties[0]->nb_antennas_rx[CC_id], enb_properties->properties[0]->nb_antennas_rx[CC_id],
enb_properties->properties[0]->nb_antennas_tx[CC_id], enb_properties->properties[0]->nb_antennas_tx[CC_id],
nb_antennas_rx_ue,
oai_emulation.info.eMBMS_active_state); oai_emulation.info.eMBMS_active_state);
} }
......
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