Commit 0bd5978e authored by David Price's avatar David Price

Both MIB and SIB1 are coming out on san jole. SIB2/3 is missing

parent fbd450ee
This diff is collapsed.
......@@ -26,6 +26,7 @@ extern RAN_CONTEXT_t RC;
#define NUM_P5_PHY 2
extern void phy_init_RU(RU_t*);
extern int mac_top_init_eNB(void);
......@@ -575,7 +576,6 @@ int param_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
nfapi_resp.header.phy_id = req->header.phy_id;
nfapi_resp.error_code = 0; // DJP - what value???
char local_addr[80];
struct sockaddr_in pnf_p7_sockaddr;
pnf_p7_sockaddr.sin_addr.s_addr = inet_addr(pnf->phys[0].local_addr);
......@@ -866,10 +866,29 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t* header)
free(header);
}
int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req)
{
//printf("[PNF] ul config request\n");
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
return 0;
}
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req)
{
//printf("[PNF] hi dci0 request\n");
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
return 0;
}
nfapi_dl_config_request_pdu_t* dlsch_pdu=0;
int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req)
{
#if 0
printf("[PNF] dl config request sfn_sf:%d(%d) pdcch:%u dci:%u pdu:%d pdsch_rnti:%d pcfich:%u - DO NOTHING\n",
#if 1
if (NFAPI_SFNSF2SF(req->sfn_sf)==5)
printf("[PNF] dl config request sfn_sf:%d(%d) pdcch:%u dci:%u pdu:%d pdsch_rnti:%d pcfich:%u\n",
req->sfn_sf,
NFAPI_SFNSF2DEC(req->sfn_sf),
req->dl_config_request_body.number_pdcch_ofdm_symbols,
......@@ -901,31 +920,55 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request
}
//int sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
//int sf = NFAPI_SFNSF2SF(req->sfn_sf);
int sf = NFAPI_SFNSF2SF(req->sfn_sf);
//struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
//int num_pdcch_symbols = eNB->pdcch_vars[sf&1].num_pdcch_symbols;
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0];
nfapi_dl_config_request_pdu_t* dl_config_pdu_list = req->dl_config_request_body.dl_config_pdu_list;
int total_number_of_pdus = req->dl_config_request_body.number_pdu;
eNB->pdcch_vars[sf&1].num_pdcch_symbols = req->dl_config_request_body.number_pdcch_ofdm_symbols;
eNB->pdcch_vars[sf&1].num_dci = 0;
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sfn_sf:%d DCI:%d PDU:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), req->dl_config_request_body.number_dci, req->dl_config_request_body.number_pdu);
if(req->vendor_extension)
free(req->vendor_extension);
// DJP - force proc to look like current frame!
proc->frame_tx = NFAPI_SFNSF2SFN(req->sfn_sf);
proc->subframe_tx = NFAPI_SFNSF2SF(req->sfn_sf);
return 0;
}
for (int i=0;i<total_number_of_pdus;i++)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PDU[%d]:\n", __FUNCTION__, i);
int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req)
{
//printf("[PNF] ul config request\n");
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
if (dl_config_pdu_list[i].pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DCI:\n", __FUNCTION__);
return 0;
}
handle_nfapi_dci_dl_pdu(eNB,proc,&dl_config_pdu_list[i]);
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req)
{
//printf("[PNF] hi dci0 request\n");
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
eNB->pdcch_vars[sf&1].num_dci++; // Is actually number of DCI PDUs
}
else if (dl_config_pdu_list[i].pdu_type == NFAPI_DL_CONFIG_BCH_PDU_TYPE)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH:\n", __FUNCTION__);
}
else if (dl_config_pdu_list[i].pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:\n", __FUNCTION__);
dlsch_pdu = &dl_config_pdu_list[i];
//handle_nfapi_dlsch_pdu(eNB,proc,dl_config_pdu, dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks-1, TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data);
}
else
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() UNKNOWN:%d\n", __FUNCTION__, dl_config_pdu_list[i].pdu_type);
}
}
if(req->vendor_extension)
free(req->vendor_extension);
return 0;
}
......@@ -967,19 +1010,27 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
uint16_t sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
uint16_t sf = NFAPI_SFNSF2SF(req->sfn_sf);
LTE_DL_FRAME_PARMS *fp = &RC.ru[0]->frame_parms;
//int ONE_SUBFRAME_OF_SAMPLES = fp->ofdm_symbol_size*fp->symbols_per_tti;
int ONE_SUBFRAME_OF_SAMPLES = fp->ofdm_symbol_size*fp->symbols_per_tti;
//int ONE_SUBFRAME_OF_SAMPLES = fp->symbols_per_tti;
//int ONE_SUBFRAME_OF_SAMPLES = fp->ofdm_symbol_size*fp->symbols_per_tti*sizeof(int32_t);
//int offset = sf * ONE_SUBFRAME_OF_SAMPLES;
int offset = sf * ONE_SUBFRAME_OF_SAMPLES;
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
//int aa;
//DJP - the proc does not seem to be getting filled - so let fill it
eNB->proc.proc_rxtx[0].frame_tx = sfn;
eNB->proc.proc_rxtx[0].subframe_tx = sf;
// clear the transmit data array for the current subframe
#if 0
for (aa=0; aa<fp->nb_antenna_ports_eNB; aa++) {
memset(&eNB->common_vars.txdataF[aa][offset], 0, ONE_SUBFRAME_OF_SAMPLES);
for (int aa=0; aa<fp->nb_antenna_ports_eNB; aa++) {
memset(&eNB->common_vars.txdataF[aa][offset], 0, ONE_SUBFRAME_OF_SAMPLES * sizeof(int32_t));
}
// clear previous allocation information for all UEs
for (int i=0; i<NUMBER_OF_UE_MAX; i++) {
if (eNB->dlsch[i][0])
eNB->dlsch[i][0]->subframe_tx[sf] = 0;
}
#endif
if (
0
......@@ -1016,45 +1067,36 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
}
else
{
int num_dci = 1; // DJP -HACK!!!!
int frame = sfn;
int subframe = sf;
int num_pdcch_symbols = 1; // DJP HARD CODe HACK - this is zero - eNB->pdcch_vars[subframe&1].num_pdcch_symbols;
if (num_dci > 0)
LOG_E(PHY,"SFN/SF:%d/%d num_dci:%d num_pdcch_symbols:%d\n", frame, subframe, num_dci, num_pdcch_symbols);
generate_dci_top(num_pdcch_symbols,
num_dci,
&eNB->pdcch_vars[subframe&1].dci_alloc[0],
0,
AMP,
fp,
eNB->common_vars.txdataF,
subframe);
// Not bch
handle_nfapi_dlsch_pdu(
eNB,
&eNB->proc.proc_rxtx[0],
dlsch_pdu,
dlsch_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks-1,
req->tx_request_body.tx_pdu_list[dlsch_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data
);
}
}
}
#if 0
{
int sched_sfn = sf==0?sfn-1:sfn-0;
int sched_sf = sf==0?9:sf-1;
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() sfn_sf:%u sfn:%u sf:%u SCHED:%d/%d calling common_signal_procedures\n",
__FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf),
sfn, sf,
sched_sfn, sched_sf
);
common_signal_procedures(eNB, sched_sfn, sched_sf);
common_signal_procedures(eNB, sfn, sf);
if (eNB->pdcch_vars[sf&1].num_dci > 0)
{
LOG_E(PHY,"SFN/SF:%d/%d eNB->pdcch_vars[sf&1].num_dci:%d num_pdcch_symbols:%d\n", sfn, sf, eNB->pdcch_vars[sf&1].num_dci, eNB->pdcch_vars[sf&1].num_pdcch_symbols);
}
#else
common_signal_procedures(eNB, sfn, sf);
#endif
generate_dci_top(
eNB->pdcch_vars[sf&1].num_pdcch_symbols,
2, // DJP - not dci - pdus!!! eNB->pdcch_vars[sf&1].num_dci,
&eNB->pdcch_vars[sf&1].dci_alloc[0],
0,
AMP,
fp,
eNB->common_vars.txdataF,
sf);
#if 1
// Now scan UE specific DLSCH
for (int UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++)
{
......@@ -1069,8 +1111,9 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
uint8_t harq_pid = dlsch0->harq_ids[sf];
AssertFatal(harq_pid>=0,"harq_pid is negative\n");
// generate pdsch
LOG_E(PHY,"PDSCH active %d/%d\n", sfn,sf);
pdsch_procedures(eNB,
&eNB->proc.proc_rxtx[sf&1],
&eNB->proc.proc_rxtx[0],
harq_pid,
dlsch0,
dlsch1,
......@@ -1086,6 +1129,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
dlsch0->subframe_tx[sf]=0;
}
}
#endif
if (0 && NFAPI_SFNSF2DEC(req->sfn_sf) % 500 == 0)
{
......@@ -1111,9 +1155,9 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
}
free(buf);
}
}
return 0;
}
}
int pnf_phy_lbt_dl_config_req(nfapi_pnf_p7_config_t* config, nfapi_lbt_dl_config_request_t* req)
......@@ -1297,6 +1341,7 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
p7_config_g = p7_config;
// DJP - INIT PHY RELATED STUFF - this should be separate i think but is not currently...
// Taken mostly from init_eNB_afterRU() dont think i can call it though...
{
printf("[PNF] %s() Calling phy_init_lte_eNB() and setting nb_antennas_rx = 1\n", __FUNCTION__);
printf("[PNF] %s() TBD create frame_parms from NFAPI message\n", __FUNCTION__);
......@@ -1309,6 +1354,8 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
for (int ce_level=0;ce_level<4;ce_level++)
RC.eNB[0][0]->prach_vars_br.rxsigF[ce_level] = (int16_t**)malloc16(64*sizeof(int16_t*));
#endif
init_transport(RC.eNB[0][0]);
//DJP - this crashes because RC.nb_RU is 1 but RC.ru[0] is NULL - init_precoding_weights(RC.eNB[0][0]);
printf("[PNF] Calling mac_top_init_eNB() so that RC.mac[] is init\n");
mac_top_init_eNB();
......
This diff is collapsed.
......@@ -32,6 +32,9 @@
#include "assertions.h"
#include <math.h>
extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
extern int32_t get_uldl_offset(int eutra_bandP);
extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138];
uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10};
......@@ -1725,9 +1728,13 @@ int phy_init_RU(RU_t *ru) {
#endif
}
LOG_D(PHY,"[INIT] %s() RC.nb_inst:%d \n", __FUNCTION__, RC.nb_inst);
for (i=0; i<RC.nb_inst; i++) {
for (p=0;p<15;p++) {
LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB);
if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
//LOG_E(PHY,"[INIT] %s() DO BEAM WEIGHTS nb_antenna_ports_eNB:%d nb_tx:%d\n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB, ru->nb_tx);
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
for (j=0; j<ru->nb_tx; j++) {
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
......@@ -1739,14 +1746,14 @@ int phy_init_RU(RU_t *ru) {
{
ru->beam_weights[i][p][j][re] = 0x00007fff;
LOG_E(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
}
}
else if (i>4) {
for (re=0; re<fp->ofdm_symbol_size; re++)
{
ru->beam_weights[i][p][j][re] = 0x00007fff/ru->nb_tx;
LOG_E(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
}
}
LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n",
......@@ -1776,7 +1783,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
#ifdef Rel14
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif
int i, eNB_id, UE_id;
int i, UE_id;
LOG_I(PHY,"[eNB %d] %s() About to wait for eNB to be configured", eNB->Mod_id, __FUNCTION__);
......
......@@ -49,7 +49,7 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx];
nfapi_dl_config_dci_dl_pdu *pdu = &dl_config_pdu->dci_dl_pdu;
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing\n",proc->frame_tx,proc->subframe_tx);
LOG_E(PHY,"Frame %d, Subframe %d: DCI processing\n",proc->frame_tx,proc->subframe_tx);
// copy dci configuration into eNB structure
fill_dci_and_dlsch(eNB,proc,&pdcch_vars->dci_alloc[pdcch_vars->num_dci],pdu);
......@@ -643,7 +643,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
// handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu);
break;
case NFAPI_DL_CONFIG_DLSCH_PDU_TYPE:
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d\n", __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
LOG_E(PHY,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE TX:%d/%d RX:%d/%d\n", __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
AssertFatal(dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index<TX_req->tx_request_body.number_of_pdus,
"dlsch_pdu_rel8.pdu_index>=TX_req->number_of_pdus (%d>%d)\n",
......
......@@ -192,7 +192,8 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
/// generate PBCH
if ((frame&3)==0) {
AssertFatal(eNB->pbch_configured==1,"PBCH was not configured by MAC\n");
//AssertFatal(eNB->pbch_configured==1,"PBCH was not configured by MAC\n");
if (eNB->pbch_configured!=1) return;
eNB->pbch_configured=0;
}
generate_pbch(&eNB->pbch,
......@@ -266,9 +267,10 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
int input_buffer_length = dlsch_harq->TBS/8;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
if (frame < 200) {
//if (frame < 200) {
if (1){
LOG_D(PHY,
LOG_E(PHY,
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
eNB->Mod_id, dlsch->rnti,harq_pid,
frame, subframe, input_buffer_length, dlsch_harq->pdsch_start,
......@@ -328,7 +330,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
}
LOG_D(PHY,"Generating DLSCH/PDSCH %d\n",ra_flag);
LOG_E(PHY,"Generating DLSCH/PDSCH %d\n",ra_flag);
// 36-212
start_meas(&eNB->dlsch_encoding_stats);
AssertFatal(dlsch_harq->pdu!=NULL,"dlsch_harq->pdu == NULL (rnti %x)\n",dlsch->rnti);
......@@ -479,8 +481,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,(frame*10)+subframe);
if (num_dci > 0)
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8")\n",eNB->Mod_id,frame, subframe,
num_dci);
LOG_E(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
generate_dci_top(num_pdcch_symbols,
num_dci,
......@@ -546,7 +547,6 @@ void prach_procedures(PHY_VARS_eNB *eNB,
#endif
) {
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4];
uint16_t i;
int frame,subframe;
......@@ -567,11 +567,9 @@ void prach_procedures(PHY_VARS_eNB *eNB,
subframe = eNB->proc.subframe_prach;
frame = eNB->proc.frame_prach;
}
uint8_t CC_id = eNB->CC_id;
RU_t *ru;
int aa=0;
int ru_aa;
LTE_eNB_PRACH *prach_vars;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1);
......@@ -614,7 +612,6 @@ void prach_procedures(PHY_VARS_eNB *eNB,
#ifdef Rel14
if (br_flag==1) {
prach_vars = &eNB->prach_vars_br;
int prach_mask;
prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br);
......@@ -674,7 +671,6 @@ void prach_procedures(PHY_VARS_eNB *eNB,
T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), 0,
T_INT(max_preamble[0]), T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0]));
prach_vars = &eNB->prach_vars;
pthread_mutex_lock(&eNB->UL_INFO_mutex);
......@@ -764,11 +760,12 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
{
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
uint8_t SR_payload = 0,pucch_b0b1[4][2]= {{0,0},{0,0},{0,0},{0,0}},harq_ack[4]={0,0,0,0};
uint8_t do_SR = 0;
uint8_t pucch_sel = 0;
int32_t metric[4]={0,0,0,0},metric_SR=0,max_metric;
ANFBmode_t bundling_flag;
#ifdef DEBUG_PHY_PROC
uint8_t pucch_sel = 0;
PUCCH_FMT_t format;
#endif
const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx;
int i;
......@@ -1257,19 +1254,21 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
uint32_t ret=0,i,j,k;
uint32_t harq_pid, harq_idx, round;
uint32_t ret=0,i;
#ifdef DEBUG_PHY_PROC
#ifdef DEBUG_ULSCH
uint32_t j;
#endif
#endif
uint32_t harq_pid;
uint8_t nPRS;
int sync_pos;
uint16_t rnti=0;
uint8_t access_mode;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
LTE_eNB_ULSCH_t *ulsch;
LTE_UL_eNB_HARQ_t *ulsch_harq;
const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx;
int offset = eNB->CC_id;//(proc == &eNB->proc.proc_rxtx[0]) ? 0 : 1;
if (fp->frame_type == FDD) harq_pid = ((10*frame) + subframe)&7;
else harq_pid = subframe%10;
......@@ -1279,6 +1278,8 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
ulsch = eNB->ulsch[i];
if (ulsch)
{
ulsch_harq = ulsch->harq_processes[harq_pid];
if (ulsch->rnti>0) LOG_D(PHY,"Frame %d, subframe %d: PUSCH procedures, harq_pid %d, UE %d/%x\n",
frame,subframe,harq_pid,i,ulsch->rnti);
......@@ -1289,10 +1290,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
(ulsch_harq->frame == frame) &&
(ulsch_harq->subframe == subframe)) {
// UE is has ULSCH scheduling
round = ulsch_harq->round;
for (int rb=0;
rb<=ulsch_harq->nb_rb;
rb++) {
......@@ -1460,6 +1457,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
// (ulsch->rnti>0) &&
// (ulsch_harq->status == ACTIVE))
} // for (i=0; i<NUMBER_OF_UE_MAX; i++) {
}
}
extern int oai_exit;
......@@ -1647,7 +1645,6 @@ void fill_ulsch_cqi_indication(PHY_VARS_eNB *eNB,uint16_t frame,uint8_t subframe
pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_cqi_indication_pdu_t *pdu = &eNB->UL_INFO.cqi_ind.cqi_pdu_list[eNB->UL_INFO.cqi_ind.number_of_cqis];
nfapi_cqi_indication_raw_pdu_t *raw_pdu = &eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list[eNB->UL_INFO.cqi_ind.number_of_cqis];
uint8_t O;
pdu->rx_ue_information.rnti = rnti;
if (ulsch_harq->cqi_crc_status != 1) pdu->cqi_indication_rel9.data_offset = 0;
......
......@@ -73,7 +73,8 @@ extern int oai_exit;
extern double cpuf;
void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
......
......@@ -59,6 +59,12 @@ extern unsigned char NB_eNB_INST;
extern RAN_CONTEXT_t RC;
extern int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
extern void RCconfig_S1(MessageDef *msg_p, uint32_t i);
extern int RCconfig_gtpu(void);
extern void RCconfig_L1(void );
extern void RCconfig_macrlc(void );
#if defined(ENABLE_ITTI)
/*------------------------------------------------------------------------------*/
......@@ -100,7 +106,7 @@ static void configure_rrc(uint32_t enb_id)
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
if (RC.rrc[enb_id]) {
RCconfig_RRC(msg_p,enb_id,&RC.rrc[enb_id]);
RCconfig_RRC(msg_p,enb_id,RC.rrc[enb_id]);
/*
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_properties->properties[enb_id]->eNB_id;
......@@ -211,11 +217,8 @@ static void configure_rrc(uint32_t enb_id)
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, const Enb_properties_array_t *enb_properties)
{
uint32_t enb_id;
uint32_t mme_id;
MessageDef *msg_p;
uint32_t register_enb_pending = 0;
char *str = NULL;
struct in_addr addr;
# if defined(OAI_EMU)
......
......@@ -60,6 +60,7 @@ extern RAN_CONTEXT_t RC;
extern int l2_init_eNB(void);
extern int mac_top_init_eNB(void);
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
/* sec 5.9, 36.321: MAC Reset Procedure */
void ue_mac_reset(module_id_t module_idP,uint8_t eNB_index)
......
......@@ -330,6 +330,8 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
"illegal dl_Bandwidth %d\n",(int)cc[CC_id].mib->message.dl_Bandwidth);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = pdcch_order_table[cc[CC_id].mib->message.dl_Bandwidth];
DL_req[CC_id].dl_config_request_body.number_dci++;
LOG_E(MAC, "%s() number_dci:%u\n", __FUNCTION__, DL_req[CC_id].dl_config_request_body.number_dci);
DL_req[CC_id].dl_config_request_body.number_pdu++;
/*
......
......@@ -701,6 +701,7 @@ schedule_SI(
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(sizeof(nfapi_dl_config_dci_dl_pdu));
dl_req->number_dci++;
LOG_E(MAC, "%s() number_dci:%u\n", __FUNCTION__, dl_req->number_dci);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
......
......@@ -60,6 +60,8 @@
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
extern void add_msg3(module_id_t module_idP,int CC_id, RA_TEMPLATE *RA_template, frame_t frameP, sub_frame_t subframeP);
// This table holds the allowable PRB sizes for ULSCH transmissions
uint8_t rb_table[33] = {1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,27,30,32,36,40,45,48,50,54,60,72,75,80,81,90,96,100};
......
......@@ -169,10 +169,10 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
#ifdef __AVX2__
buff_tx[i][j] = _mm256_slli_epi16(((__m256i*)buff[i])[j],4);
#else
buff_tx[i][j] = _mm_slli_epi16(((__m128i*)buff128[i])[j],4);
buff_tx[i][j] = _mm_slli_epi16(((__m128i*)buff[i])[j],4);
#endif
#elif defined(__arm__)
buff_tx[i][j] = vshlq_n_s16(((int16x8_t*)buff128[i])[j],4);
buff_tx[i][j] = vshlq_n_s16(((int16x8_t*)buff[i])[j],4);
#endif
}
}
......
......@@ -141,11 +141,7 @@ eNBs =
////////// MME parameters:
<<<<<<< HEAD
mme_ip_address = ( { ipv4 = "192.168.1.78";
=======
mme_ip_address = ( { ipv4 = "192.168.12.26";
>>>>>>> b421d467ad96939fde41734f1e3b7bb793939063
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -155,17 +151,10 @@ eNBs =
NETWORK_INTERFACES :
{
<<<<<<< HEAD
ENB_INTERFACE_NAME_FOR_S1_MME = "eno1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.1.74/24";
ENB_INTERFACE_NAME_FOR_S1U = "eno1";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.1.74/24";
=======
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24";
>>>>>>> b421d467ad96939fde41734f1e3b7bb793939063
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
......@@ -206,7 +195,6 @@ L1s = (
RUs = (
{
<<<<<<< HEAD
local_rf = "yes"
nb_tx = 1
nb_rx = 1
......@@ -216,17 +204,5 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
=======
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
>>>>>>> b421d467ad96939fde41734f1e3b7bb793939063
}
);
......@@ -3,7 +3,6 @@ L1s = (
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "eno1";
#remote_n_address = "192.168.1.78";
remote_n_address = "192.168.1.28";
local_n_address = "192.168.1.74";
local_n_portc = 50000;
......
......@@ -164,12 +164,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
}
// *******************************************************************
//if (proc->subframe_tx==0) LOG_W(PHY, "sfn/sf:%d:%d eNB:%p eNB[0]:%p eNB[0][0]:%p dlsch:%p:%p:%p rnti:%d\n", proc->frame_tx, proc->subframe_tx, RC.eNB, RC.eNB[0], RC.eNB[0][0], RC.eNB[0][0]->dlsch, RC.eNB[0][0]->dlsch[0], RC.eNB[0][0]->dlsch[0][0], RC.eNB[0][0]->dlsch[0][0]->rnti);
if ( proc->frame_tx == 22 && proc->subframe_tx==5) { LOG_D(PHY,"22/5\n"); }
// ****************************************
// Common RX procedures subframe n
// if this is IF5 or 3GPP_eNB
if (eNB && eNB->RU_list && eNB->RU_list[0] && eNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
LOG_D(PHY,"%s:%s() %u/%u Before wakeup_prach_eNB() proc->instance_cnt_rxtx:%d\n", thread_name, __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->instance_cnt_rxtx);
......@@ -180,10 +176,12 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
LOG_D(PHY,"%s:%s() %u/%u proc->instance_cnt_rxtx:%d\n", thread_name, __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->instance_cnt_rxtx);
#endif
}
// UE-specific RX processing for subframe n
LOG_D(PHY,"%s:%s() %u/%u Before phy_procedures_eNB_uespec_RX() proc->instance_cnt_rxtx:%d\n", thread_name, __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->instance_cnt_rxtx);
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
LOG_D(PHY,"%s:%s() %u/%u Before UL_INFO_mutex proc->instance_cnt_rxtx:%d\n", thread_name, __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->instance_cnt_rxtx);
pthread_mutex_lock(&eNB->UL_INFO_mutex);
LOG_D(PHY,"%s:%s() %u/%u After UL_INFO_mutex proc->instance_cnt_rxtx:%d\n", thread_name, __FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->instance_cnt_rxtx);
......
......@@ -1734,8 +1734,16 @@ int main( int argc, char **argv )
printf("RC.nb_RU:%d\n", RC.nb_RU);
// once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init eNBs\n");
printf("DJP - commented out call to init_eNB_afterRU() will be called by nFAPI\n\n\n\n");
if (nfapi_pnf != 1 && nfapi_pnf != 2)
{
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
init_eNB_afterRU();
}
else
{
printf("NFAPI mode - DO NOT call init_eNB_afterRU()\n");
}
printf("ALL RUs ready - ALL eNBs ready\n");
}
......
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