Commit 10c9d899 authored by Cedric Roux's avatar Cedric Roux
Browse files

Merge remote-tracking branch 'origin/bugfix-258-unknown-ue-id-for-rnti' into...

Merge remote-tracking branch 'origin/bugfix-258-unknown-ue-id-for-rnti' into develop_integration_w30
parents a2f37668 8d5901c8
...@@ -2179,8 +2179,7 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci, ...@@ -2179,8 +2179,7 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
return(0); return(0);
} }
uint8_t generate_dci_top(uint8_t num_ue_spec_dci, uint8_t generate_dci_top(int num_dci,
uint8_t num_common_dci,
DCI_ALLOC_t *dci_alloc, DCI_ALLOC_t *dci_alloc,
uint32_t n_rnti, uint32_t n_rnti,
int16_t amp, int16_t amp,
...@@ -2190,7 +2189,6 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2190,7 +2189,6 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
{ {
uint8_t *e_ptr,num_pdcch_symbols; uint8_t *e_ptr,num_pdcch_symbols;
int8_t L;
uint32_t i, lprime; uint32_t i, lprime;
uint32_t gain_lin_QPSK,kprime,kprime_mod12,mprime,nsymb,symbol_offset,tti_offset; uint32_t gain_lin_QPSK,kprime,kprime_mod12,mprime,nsymb,symbol_offset,tti_offset;
int16_t re_offset; int16_t re_offset;
...@@ -2236,9 +2234,9 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2236,9 +2234,9 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
break; break;
} }
num_pdcch_symbols = get_num_pdcch_symbols(num_ue_spec_dci+num_common_dci,dci_alloc,frame_parms,subframe); num_pdcch_symbols = get_num_pdcch_symbols(num_dci,dci_alloc,frame_parms,subframe);
// printf("subframe %d in generate_dci_top num_pdcch_symbols = %d, num_dci %d\n", // printf("subframe %d in generate_dci_top num_pdcch_symbols = %d, num_dci %d\n",
// subframe,num_pdcch_symbols,num_ue_spec_dci+num_common_dci); // subframe,num_pdcch_symbols,num_dci);
generate_pcfich(num_pdcch_symbols, generate_pcfich(num_pdcch_symbols,
amp, amp,
frame_parms, frame_parms,
...@@ -2257,50 +2255,22 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2257,50 +2255,22 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
e_ptr = e; e_ptr = e;
// generate DCIs in order of decreasing aggregation level, then common/ue spec // generate DCIs
// MAC is assumed to have ordered the UE spec DCI according to the RNTI-based randomization for (i=0; i<num_dci; i++) {
for (L=3; L>=0; L--) {
for (i=0; i<num_common_dci; i++) {
if (dci_alloc[i].L == (uint8_t)L) {
#ifdef DEBUG_DCI_ENCODING
printf("Generating common DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",i,num_common_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,1<<dci_alloc[i].L,
*(unsigned int*)dci_alloc[i].dci_pdu);
dump_dci(frame_parms,&dci_alloc[i]);
#endif
if (dci_alloc[i].firstCCE>=0) {
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length,
dci_alloc[i].L,
dci_alloc[i].rnti);
}
}
}
for (; i<num_ue_spec_dci + num_common_dci; i++) {
if (dci_alloc[i].L == (uint8_t)L) {
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
printf(" Generating UE (rnti %x) (nCCE %d) specific DCI %d of length %d, aggregation %d, format %d (%x)\n",dci_alloc[i].rnti,dci_alloc[i].firstCCE,i,dci_alloc[i].dci_length,1<<dci_alloc[i].L,dci_alloc[i].format, printf("Generating %s DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",
dci_alloc[i].dci_pdu); dci_alloc[i].search_space == DCI_COMMON_SPACE ? "common" : "UE",
dump_dci(frame_parms,&dci_alloc[i]); i,num_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,1<<dci_alloc[i].L,
*(unsigned int*)dci_alloc[i].dci_pdu);
dump_dci(frame_parms,&dci_alloc[i]);
#endif #endif
if (dci_alloc[i].firstCCE >= 0) { if (dci_alloc[i].firstCCE>=0) {
e_ptr = generate_dci0(dci_alloc[i].dci_pdu, e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
e+(72*dci_alloc[i].firstCCE), e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length, dci_alloc[i].dci_length,
dci_alloc[i].L, dci_alloc[i].L,
dci_alloc[i].rnti); dci_alloc[i].rnti);
}
else {
}
}
} }
} }
...@@ -2511,21 +2481,34 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2511,21 +2481,34 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
#ifdef PHY_ABSTRACTION #ifdef PHY_ABSTRACTION
uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t num_ue_spec_dci, int num_dci,
uint8_t num_common_dci,
DCI_ALLOC_t *dci_alloc, DCI_ALLOC_t *dci_alloc,
uint8_t subframe) uint8_t subframe)
{ {
int n_dci, n_dci_dl; int n_dci, n_dci_dl;
uint8_t ue_id; uint8_t ue_id;
LTE_eNB_DLSCH_t *dlsch_eNB; LTE_eNB_DLSCH_t *dlsch_eNB;
uint8_t num_pdcch_symbols = get_num_pdcch_symbols(num_ue_spec_dci+num_common_dci, int num_ue_spec_dci;
int num_common_dci;
int i;
uint8_t num_pdcch_symbols = get_num_pdcch_symbols(num_dci,
dci_alloc, dci_alloc,
&phy_vars_eNB->frame_parms, &phy_vars_eNB->frame_parms,
subframe); subframe);
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.cfi=num_pdcch_symbols; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].cntl.cfi=num_pdcch_symbols;
memcpy(phy_vars_eNB->dci_alloc[subframe&1],dci_alloc,sizeof(DCI_ALLOC_t)*(num_ue_spec_dci+num_common_dci)); num_ue_spec_dci = 0;
num_common_dci = 0;
for (i = 0; i < num_dci; i++) {
/* TODO: maybe useless test, to remove? */
if (!(dci_alloc[i].firstCCE>=0)) abort();
if (dci_alloc[i].search_space == DCI_COMMON_SPACE)
num_common_dci++;
else
num_ue_spec_dci++;
}
memcpy(phy_vars_eNB->dci_alloc[subframe&1],dci_alloc,sizeof(DCI_ALLOC_t)*(num_dci));
phy_vars_eNB->num_ue_spec_dci[subframe&1]=num_ue_spec_dci; phy_vars_eNB->num_ue_spec_dci[subframe&1]=num_ue_spec_dci;
phy_vars_eNB->num_common_dci[subframe&1]=num_common_dci; phy_vars_eNB->num_common_dci[subframe&1]=num_common_dci;
eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci = num_ue_spec_dci; eNB_transport_info[phy_vars_eNB->Mod_id][phy_vars_eNB->CC_id].num_ue_spec_dci = num_ue_spec_dci;
......
...@@ -781,6 +781,10 @@ typedef enum { ...@@ -781,6 +781,10 @@ typedef enum {
pucch_format3 // PUCCH format3 pucch_format3 // PUCCH format3
} PUCCH_FMT_t; } PUCCH_FMT_t;
typedef enum {
DCI_COMMON_SPACE,
DCI_UE_SPACE
} dci_space_t;
typedef struct { typedef struct {
/// Length of DCI in bits /// Length of DCI in bits
...@@ -795,6 +799,8 @@ typedef struct { ...@@ -795,6 +799,8 @@ typedef struct {
rnti_t rnti; rnti_t rnti;
/// Format /// Format
DCI_format_t format; DCI_format_t format;
/// search space
dci_space_t search_space;
/// DCI pdu /// DCI pdu
uint8_t dci_pdu[8]; uint8_t dci_pdu[8];
} DCI_ALLOC_t; } DCI_ALLOC_t;
......
...@@ -1454,8 +1454,7 @@ void dci_encoding(uint8_t *a, ...@@ -1454,8 +1454,7 @@ void dci_encoding(uint8_t *a,
uint16_t rnti); uint16_t rnti);
/*! \brief Top-level DCI entry point. This routine codes an set of DCI PDUs and performs PDCCH modulation, interleaving and mapping. /*! \brief Top-level DCI entry point. This routine codes an set of DCI PDUs and performs PDCCH modulation, interleaving and mapping.
\param num_ue_spec_dci Number of UE specific DCI pdus to encode \param num_dci Number of DCI pdus to encode
\param num_common_dci Number of Common DCI pdus to encode
\param dci_alloc Allocation vectors for each DCI pdu \param dci_alloc Allocation vectors for each DCI pdu
\param n_rnti n_RNTI (see ) \param n_rnti n_RNTI (see )
\param amp Amplitude of QPSK symbols \param amp Amplitude of QPSK symbols
...@@ -1464,8 +1463,7 @@ void dci_encoding(uint8_t *a, ...@@ -1464,8 +1463,7 @@ void dci_encoding(uint8_t *a,
\param sub_frame_offset subframe offset in frame \param sub_frame_offset subframe offset in frame
@returns Number of PDCCH symbols @returns Number of PDCCH symbols
*/ */
uint8_t generate_dci_top(uint8_t num_ue_spec_dci, uint8_t generate_dci_top(int num_dci,
uint8_t num_common_dci,
DCI_ALLOC_t *dci_alloc, DCI_ALLOC_t *dci_alloc,
uint32_t n_rnti, uint32_t n_rnti,
int16_t amp, int16_t amp,
...@@ -1474,8 +1472,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -1474,8 +1472,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
uint32_t sub_frame_offset); uint32_t sub_frame_offset);
uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB, uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t num_ue_spec_dci, int num_dci,
uint8_t num_common_dci,
DCI_ALLOC_t *dci_alloc, DCI_ALLOC_t *dci_alloc,
uint8_t subframe); uint8_t subframe);
......
...@@ -72,19 +72,19 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -72,19 +72,19 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
LOG_D(PHY,"frame %d, subframe %d, transmission_mode %d\n",proc->frame_tx,proc->subframe_tx,transmission_mode); LOG_D(PHY,"frame %d, subframe %d, transmission_mode %d\n",proc->frame_tx,proc->subframe_tx,transmission_mode);
DCI_pdu->Num_common_dci = 0; DCI_pdu->Num_dci = 0;
DCI_pdu->Num_ue_spec_dci=0;
switch (subframe) { switch (subframe) {
case 5: case 5:
if ( !(proc->frame_tx&1) ) // SI message on even frame only (SFN mod 2 == 0) if ( !(proc->frame_tx&1) ) // SI message on even frame only (SFN mod 2 == 0)
{ {
DCI_pdu->Num_common_dci = 1; DCI_pdu->Num_dci = 1;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].firstCCE = 0; DCI_pdu->dci_alloc[0].firstCCE = 0;
DCI_pdu->dci_alloc[0].rnti = SI_RNTI; DCI_pdu->dci_alloc[0].rnti = SI_RNTI;
DCI_pdu->dci_alloc[0].format = format1A; DCI_pdu->dci_alloc[0].format = format1A;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_COMMON_SPACE;
switch (eNB->frame_parms.N_RB_DL) { switch (eNB->frame_parms.N_RB_DL) {
case 6: case 6:
...@@ -206,12 +206,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -206,12 +206,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
} }
/* /*
case 6: case 6:
DCI_pdu->Num_ue_spec_dci = 1; DCI_pdu->Num_dci = 1;
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_M10PRB_TDD_t;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].rnti = 0x1236; DCI_pdu->dci_alloc[0].rnti = 0x1236;
DCI_pdu->dci_alloc[0].format = format2_2A_M10PRB; DCI_pdu->dci_alloc[0].format = format2_2A_M10PRB;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
DLSCH_alloc_pdu1.rballoc = 0x00ff; DLSCH_alloc_pdu1.rballoc = 0x00ff;
DLSCH_alloc_pdu1.TPC = 0; DLSCH_alloc_pdu1.TPC = 0;
...@@ -228,12 +229,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -228,12 +229,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
default: default:
case 7: case 7:
DCI_pdu->Num_ue_spec_dci = 1; DCI_pdu->Num_dci = 1;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].firstCCE = 0; DCI_pdu->dci_alloc[0].firstCCE = 0;
DCI_pdu->dci_alloc[0].rnti = 0x1235; DCI_pdu->dci_alloc[0].rnti = 0x1235;
DCI_pdu->dci_alloc[0].format = format1; DCI_pdu->dci_alloc[0].format = format1;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
if (transmission_mode<3 || transmission_mode == 7) { if (transmission_mode<3 || transmission_mode == 7) {
//user 1 //user 1
...@@ -459,10 +461,11 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -459,10 +461,11 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
DCI_pdu->dci_alloc[1].L = 2; DCI_pdu->dci_alloc[1].L = 2;
DCI_pdu->dci_alloc[1].rnti = 0x1235; DCI_pdu->dci_alloc[1].rnti = 0x1235;
DCI_pdu->dci_alloc[1].format = format0; DCI_pdu->dci_alloc[1].format = format0;
DCI_pdu->dci_alloc[1].ra_flag = 0; DCI_pdu->dci_alloc[1].ra_flag = 0;
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
if (eNB->frame_parms.frame_type == FDD) { if (eNB->frame_parms.frame_type == FDD) {
switch (eNB->frame_parms.N_RB_DL) { switch (eNB->frame_parms.N_RB_DL) {
...@@ -601,13 +604,14 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -601,13 +604,14 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
} }
} }
} else if (transmission_mode==4) { } else if (transmission_mode==4) {
DCI_pdu->Num_ue_spec_dci = 1; DCI_pdu->Num_dci = 1;
// user 1 // user 1
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_FDD_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI2_5MHz_2A_FDD_t;
DCI_pdu->dci_alloc[0].L = 3; DCI_pdu->dci_alloc[0].L = 3;
DCI_pdu->dci_alloc[0].rnti = 0x1235; DCI_pdu->dci_alloc[0].rnti = 0x1235;
DCI_pdu->dci_alloc[0].format = format2; DCI_pdu->dci_alloc[0].format = format2;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->tpmi = 0; ((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->tpmi = 0;
((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->rv1 = 0; ((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->rv1 = 0;
...@@ -623,13 +627,14 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -623,13 +627,14 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->rah = 0; ((DCI2_5MHz_2A_FDD_t*) (&DCI_pdu->dci_alloc[0].dci_pdu))->rah = 0;
} else if (transmission_mode==5) { } else if (transmission_mode==5) {
DCI_pdu->Num_ue_spec_dci = 2; DCI_pdu->Num_dci = 2;
// user 1 // user 1
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
DCI_pdu->dci_alloc[0].L = 3; DCI_pdu->dci_alloc[0].L = 3;
DCI_pdu->dci_alloc[0].rnti = 0x1235; DCI_pdu->dci_alloc[0].rnti = 0x1235;
DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB; DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
DLSCH_alloc_pdu1E.tpmi = 5; //5=use feedback DLSCH_alloc_pdu1E.tpmi = 5; //5=use feedback
DLSCH_alloc_pdu1E.rv = 0; DLSCH_alloc_pdu1E.rv = 0;
...@@ -648,11 +653,12 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -648,11 +653,12 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t)); memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
//user 2 //user 2
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t; DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
DCI_pdu->dci_alloc[1].L = 0; DCI_pdu->dci_alloc[1].L = 0;
DCI_pdu->dci_alloc[1].rnti = 0x1236; DCI_pdu->dci_alloc[1].rnti = 0x1236;
DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB; DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB;
DCI_pdu->dci_alloc[1].ra_flag = 0; DCI_pdu->dci_alloc[1].ra_flag = 0;
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
//DLSCH_alloc_pdu1E.mcs = eNB->target_ue_dl_mcs; //DLSCH_alloc_pdu1E.mcs = eNB->target_ue_dl_mcs;
//DLSCH_alloc_pdu1E.mcs = (unsigned char) (taus()%28); //DLSCH_alloc_pdu1E.mcs = (unsigned char) (taus()%28);
//DLSCH_alloc_pdu1E.mcs = (unsigned char) ((eNB->frame%1024)%28); //DLSCH_alloc_pdu1E.mcs = (unsigned char) ((eNB->frame%1024)%28);
...@@ -669,12 +675,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -669,12 +675,13 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
/* /*
case 8: case 8:
DCI_pdu->Num_common_dci = 1; DCI_pdu->Num_dci = 1;
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].rnti = 0xbeef; DCI_pdu->dci_alloc[0].rnti = 0xbeef;
DCI_pdu->dci_alloc[0].format = format1A; DCI_pdu->dci_alloc[0].format = format1A;
DCI_pdu->dci_alloc[0].ra_flag = 1; DCI_pdu->dci_alloc[0].ra_flag = 1;
DCI_pdu->dci_alloc[0].search_space = DCI_COMMON_SPACE;
RA_alloc_pdu.type = 1; RA_alloc_pdu.type = 1;
RA_alloc_pdu.vrb_type = 0; RA_alloc_pdu.vrb_type = 0;
...@@ -721,7 +728,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -721,7 +728,7 @@ void fill_dci(DCI_PDU *DCI_pdu,PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
/* /*
DCI_pdu->nCCE = 0; DCI_pdu->nCCE = 0;
for (i=0; i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci; i++) { for (i=0; i<DCI_pdu->Num_dci; i++) {
DCI_pdu->nCCE += (1<<(DCI_pdu->dci_alloc[i].L)); DCI_pdu->nCCE += (1<<(DCI_pdu->dci_alloc[i].L));
} }
*/ */
...@@ -743,20 +750,20 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -743,20 +750,20 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
rand = (rand%4)+5; rand = (rand%4)+5;
*/ */
DCI_pdu->Num_common_dci = 0; DCI_pdu->Num_dci = 0;
DCI_pdu->Num_ue_spec_dci=0;
switch (subframe) { switch (subframe) {
case 5: case 5:
DCI_pdu->Num_ue_spec_dci = 1; DCI_pdu->Num_dci = 1;
if (transmission_mode<3) { if (transmission_mode<3) {
//user 1 //user 1
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_5MHz_TDD_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1_5MHz_TDD_t;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].rnti = 0x1235; DCI_pdu->dci_alloc[0].rnti = 0x1235;
DCI_pdu->dci_alloc[0].format = format1; DCI_pdu->dci_alloc[0].format = format1;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
DLSCH_alloc_pdu.rballoc = eNB->ue_dl_rb_alloc; DLSCH_alloc_pdu.rballoc = eNB->ue_dl_rb_alloc;
DLSCH_alloc_pdu.TPC = 0; DLSCH_alloc_pdu.TPC = 0;
...@@ -769,11 +776,12 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -769,11 +776,12 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
/* /*
//user2 //user2
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1_5MHz_TDD_t; DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1_5MHz_TDD_t;
DCI_pdu->dci_alloc[1].L = 2; DCI_pdu->dci_alloc[1].L = 2;
DCI_pdu->dci_alloc[1].rnti = 0x1236; DCI_pdu->dci_alloc[1].rnti = 0x1236;
DCI_pdu->dci_alloc[1].format = format1; DCI_pdu->dci_alloc[1].format = format1;
DCI_pdu->dci_alloc[1].ra_flag = 0; DCI_pdu->dci_alloc[1].ra_flag = 0;
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
DLSCH_alloc_pdu.rballoc = rballoc2; DLSCH_alloc_pdu.rballoc = rballoc2;
DLSCH_alloc_pdu.TPC = 0; DLSCH_alloc_pdu.TPC = 0;
...@@ -785,13 +793,14 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -785,13 +793,14 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&DLSCH_alloc_pdu,sizeof(DCI1_5MHz_TDD_t)); memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&DLSCH_alloc_pdu,sizeof(DCI1_5MHz_TDD_t));
*/ */
} else if (transmission_mode==5) { } else if (transmission_mode==5) {
DCI_pdu->Num_ue_spec_dci = 2; DCI_pdu->Num_dci = 2;
// user 1 // user 1
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].rnti = 0x1235; DCI_pdu->dci_alloc[0].rnti = 0x1235;
DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB; DCI_pdu->dci_alloc[0].format = format1E_2A_M10PRB;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
DLSCH_alloc_pdu1E.tpmi = 5; //5=use feedback DLSCH_alloc_pdu1E.tpmi = 5; //5=use feedback
DLSCH_alloc_pdu1E.rv = 0; DLSCH_alloc_pdu1E.rv = 0;
...@@ -806,11 +815,12 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -806,11 +815,12 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t)); memcpy((void*)&DCI_pdu->dci_alloc[0].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
//user 2 //user 2
DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t; DCI_pdu->dci_alloc[1].dci_length = sizeof_DCI1E_5MHz_2A_M10PRB_TDD_t;
DCI_pdu->dci_alloc[1].L = 2; DCI_pdu->dci_alloc[1].L = 2;
DCI_pdu->dci_alloc[1].rnti = 0x1236; DCI_pdu->dci_alloc[1].rnti = 0x1236;
DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB; DCI_pdu->dci_alloc[1].format = format1E_2A_M10PRB;
DCI_pdu->dci_alloc[1].ra_flag = 0; DCI_pdu->dci_alloc[1].ra_flag = 0;
DCI_pdu->dci_alloc[1].search_space = DCI_UE_SPACE;
memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t)); memcpy((void*)&DCI_pdu->dci_alloc[1].dci_pdu[0],(void *)&DLSCH_alloc_pdu1E,sizeof(DCI1E_5MHz_2A_M10PRB_TDD_t));
...@@ -821,12 +831,13 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -821,12 +831,13 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
break; break;
case 7: case 7:
DCI_pdu->Num_common_dci = 1; DCI_pdu->Num_dci = 1;
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI1A_5MHz_TDD_1_6_t;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].rnti = 0xbeef; DCI_pdu->dci_alloc[0].rnti = 0xbeef;
DCI_pdu->dci_alloc[0].format = format1A; DCI_pdu->dci_alloc[0].format = format1A;
DCI_pdu->dci_alloc[0].ra_flag = 1; DCI_pdu->dci_alloc[0].ra_flag = 1;
DCI_pdu->dci_alloc[0].search_space = DCI_COMMON_SPACE;
RA_alloc_pdu.type = 1; RA_alloc_pdu.type = 1;
RA_alloc_pdu.vrb_type = 0; RA_alloc_pdu.vrb_type = 0;
...@@ -841,14 +852,15 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -841,14 +852,15 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
break; break;
case 9: case 9:
DCI_pdu->Num_ue_spec_dci = 1; DCI_pdu->Num_dci = 1;
//user 1 //user 1
DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI0_5MHz_TDD_1_6_t ; DCI_pdu->dci_alloc[0].dci_length = sizeof_DCI0_5MHz_TDD_1_6_t ;
DCI_pdu->dci_alloc[0].L = 2; DCI_pdu->dci_alloc[0].L = 2;
DCI_pdu->dci_alloc[0].rnti = 0x1235; DCI_pdu->dci_alloc[0].rnti = 0x1235;
DCI_pdu->dci_alloc[0].format = format0; DCI_pdu->dci_alloc[0].format = format0;
DCI_pdu->dci_alloc[0].ra_flag = 0; DCI_pdu->dci_alloc[0].ra_flag = 0;
DCI_pdu->dci_alloc[0].search_space = DCI_UE_SPACE;
UL_alloc_pdu.type = 0; UL_alloc_pdu.type = 0;
UL_alloc_pdu.hopping = 0; UL_alloc_pdu.hopping = 0;
...@@ -894,7 +906,7 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB) ...@@ -894,7 +906,7 @@ void fill_dci_emos(DCI_PDU *DCI_pdu, uint8_t subframe, PHY_VARS_eNB *eNB)
/* /*
DCI_pdu->nCCE = 0;