Commit 6454c61f authored by Matthieu Kanj's avatar Matthieu Kanj

PHY TX Gen

parent c7d050c1
...@@ -614,7 +614,7 @@ typedef struct { ...@@ -614,7 +614,7 @@ typedef struct {
typedef struct { typedef struct {
/// Allocated RNTI (0 means DLSCH_t is not currently used) /// Allocated RNTI (0 means DLSCH_t is not currently used)
uint16_t rnti; uint32_t rnti;
/// Active flag for baseband transmitter processing /// Active flag for baseband transmitter processing
uint8_t active; uint8_t active;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK. /// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
......
...@@ -47,64 +47,6 @@ ...@@ -47,64 +47,6 @@
#include "PHY/LTE_REFSIG/defs_NB_IoT.h" #include "PHY/LTE_REFSIG/defs_NB_IoT.h"
#include "openair1/PHY/extern_NB_IoT.h" #include "openair1/PHY/extern_NB_IoT.h"
void dlsch_sib_scrambling_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_DL_eNB_SIB_t *dlsch,
int tot_bits, // total number of bits to transmit
uint16_t Nf, // Nf is the frame number (0..9)
uint8_t Ns)
{
int i,j,k=0;
uint32_t x1,x2, s=0;
uint8_t *e = dlsch->e; //uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
//x2 = (dlsch->si_rnti<<15) + (frame_parms->Nid_cell + 1) * ( (Nf % 61) + 1 ) ;
x2 = (dlsch->si_rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell;
// for NPDSCH not carriying SIBs
//x2 = (dlsch->harq_process_sib1.rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 10.2.3.1
s = lte_gold_generic_NB_IoT(&x1, &x2, 1);
for (i=0; i<(1+(tot_bits>>5)); i++) {
for (j=0; j<32; j++,k++) {
dlsch->s_e[k] = (e[k]&1) ^ ((s>>j)&1);
}
s = lte_gold_generic_NB_IoT(&x1, &x2, 0);
}
}
void dlsch_sib_scrambling_rar_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_DL_eNB_HARQ_t *dlsch,
int tot_bits, // total number of bits to transmit
uint16_t Nf, // Nf is the frame number (0..9)
uint8_t Ns,
uint32_t rnti)
{
int i,j,k=0;
uint32_t x1,x2, s=0;
uint8_t *e = dlsch->e; //uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
//x2 = (dlsch->si_rnti<<15) + (frame_parms->Nid_cell + 1) * ( (Nf % 61) + 1 ) ;
x2 = (rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell;
// for NPDSCH not carriying SIBs
//x2 = (dlsch->harq_process_sib1.rnti<<14) + ((Nf%2)<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 10.2.3.1
s = lte_gold_generic_NB_IoT(&x1, &x2, 1);
for (i=0; i<(1+(tot_bits>>5)); i++) {
for (j=0; j<32; j++,k++) {
dlsch->s_e[k] = (e[k]&1) ^ ((s>>j)&1);
}
s = lte_gold_generic_NB_IoT(&x1, &x2, 0);
}
}
void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms, void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_eNB_NDLSCH_t *dlsch, NB_IoT_eNB_NDLSCH_t *dlsch,
......
...@@ -120,18 +120,6 @@ void npbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -120,18 +120,6 @@ void npbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t *npbch_e, uint8_t *npbch_e,
uint32_t length); uint32_t length);
void dlsch_sib_scrambling_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_DL_eNB_SIB_t *dlsch, //NB_IoT_eNB_NDLSCH_t
int tot_bits,
uint16_t Nf,
uint8_t Ns);
void dlsch_sib_scrambling_rar_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_DL_eNB_HARQ_t *dlsch,
int tot_bits, // total number of bits to transmit
uint16_t Nf, // Nf is the frame number (0..9)
uint8_t Ns,
uint32_t rnti);
void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms, void dlsch_scrambling_Gen_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,
NB_IoT_eNB_NDLSCH_t *dlsch, NB_IoT_eNB_NDLSCH_t *dlsch,
...@@ -306,7 +294,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF, ...@@ -306,7 +294,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
unsigned int npdsch_data_subframe, // subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf unsigned int npdsch_data_subframe, // subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned int subframe, unsigned int subframe,
unsigned short NB_IoT_RB_ID); unsigned short NB_IoT_RB_ID);
/*
int dlsch_modulation_rar_NB_IoT(int32_t **txdataF, int dlsch_modulation_rar_NB_IoT(int32_t **txdataF,
int16_t amp, int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
...@@ -317,7 +305,7 @@ int dlsch_modulation_rar_NB_IoT(int32_t **txdataF, ...@@ -317,7 +305,7 @@ int dlsch_modulation_rar_NB_IoT(int32_t **txdataF,
unsigned int subframe, unsigned int subframe,
unsigned short NB_IoT_RB_ID, unsigned short NB_IoT_RB_ID,
uint8_t option); uint8_t option);
*/
int32_t dlsch_encoding_NB_IoT(unsigned char *a, int32_t dlsch_encoding_NB_IoT(unsigned char *a,
NB_IoT_DL_eNB_HARQ_t *dlsch, // NB_IoT_eNB_NDLSCH_t NB_IoT_DL_eNB_HARQ_t *dlsch, // NB_IoT_eNB_NDLSCH_t
uint8_t Nsf, // number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table) uint8_t Nsf, // number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
......
...@@ -718,7 +718,7 @@ if(proc->flag_msg4 == 1 && proc->counter_msg4 > 0) ...@@ -718,7 +718,7 @@ if(proc->flag_msg4 == 1 && proc->counter_msg4 > 0)
1); //////////// G*2 // option =2 for msg4 1); //////////// G*2 // option =2 for msg4
dlsch_sib_scrambling_rar_NB_IoT(fp, dlsch_scrambling_Gen_NB_IoT(fp,
rar, rar,
236, 236,
frame, frame,
...@@ -1268,7 +1268,7 @@ if(subframe !=5 && subframe !=0) ...@@ -1268,7 +1268,7 @@ if(subframe !=5 && subframe !=0)
1); //////////// G*2 1); //////////// G*2
dlsch_sib_scrambling_rar_NB_IoT(fp, dlsch_scrambling_Gen_NB_IoT(fp,
rar, rar,
236, 236,
frame, frame,
...@@ -1316,7 +1316,7 @@ if(subframe !=5 && subframe !=0) ...@@ -1316,7 +1316,7 @@ if(subframe !=5 && subframe !=0)
1); //////////// G*2 1); //////////// G*2
dlsch_sib_scrambling_rar_NB_IoT(fp, dlsch_scrambling_Gen_NB_IoT(fp,
rar, rar,
236, 236,
frame, frame,
......
...@@ -338,11 +338,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -338,11 +338,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
1); //////////// G*2 1); //////////// G*2
dlsch_sib_scrambling_NB_IoT(fp, dlsch_scrambling_Gen_NB_IoT(fp,
sib1, sib1,
1888, 1888,
frame, frame,
subframe*2); subframe*2,
eNB->ndlsch_SIB1->rnti);
} }
dlsch_modulation_NB_IoT(txdataF, dlsch_modulation_NB_IoT(txdataF,
...@@ -375,11 +376,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -375,11 +376,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
2); //////////// G*2 2); //////////// G*2
dlsch_sib_scrambling_NB_IoT(fp, // is called only in subframe 4 dlsch_scrambling_Gen_NB_IoT(fp, // is called only in subframe 4
sib23, sib23,
1888, ////// total_bits 1888, ////// total_bits
frame, frame,
subframe*2); subframe*2,
eNB->ndlsch_SIB23->rnti);
} }
if( subframe < 5 ) if( subframe < 5 )
......
...@@ -147,7 +147,8 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -147,7 +147,8 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
PHY_vars_eNB->ndlsch_SIB23 = new_eNB_dlsch_NB_IoT(1,frame_parms); PHY_vars_eNB->ndlsch_SIB23 = new_eNB_dlsch_NB_IoT(1,frame_parms);
PHY_vars_eNB->ndlsch_RAR = new_eNB_dlsch_NB_IoT(1,frame_parms); PHY_vars_eNB->ndlsch_RAR = new_eNB_dlsch_NB_IoT(1,frame_parms);
PHY_vars_eNB->ndlsch_SIB1->rnti = 0xffff;
PHY_vars_eNB->ndlsch_SIB23->rnti = 0xffff;
PHY_vars_eNB->rx_total_gain_dB=130; PHY_vars_eNB->rx_total_gain_dB=130;
......
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