Commit 6f4d5db7 authored by Michele Paffetti's avatar Michele Paffetti

put relevant comment for starting the implementation of physical prcedures. Code not compile

parent a6507165
...@@ -2045,6 +2045,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2045,6 +2045,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
uint32_t n_rnti, uint32_t n_rnti,
int16_t amp, int16_t amp,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
//NB_IoT_eNB_NPDCCH_t npdcch,
int32_t **txdataF, int32_t **txdataF,
uint32_t subframe) uint32_t subframe)
{ {
...@@ -2131,11 +2132,24 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2131,11 +2132,24 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
#endif #endif
if (dci_alloc[i].firstCCE>=0) { if (dci_alloc[i].firstCCE>=0) {
//encoding
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);
//new NB-IoT
npdcch_encoding_NB_IoT(
dci_alloc[i].dci_pdu,
frame_parms,
npdcch, //see when function dci_top is called
//no frame
subframe
//rm_stats, te_stats, i_stats
);
} }
} }
} }
...@@ -2174,6 +2188,31 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2174,6 +2188,31 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
//NB-IoT--------------------------
/*
* switch(npdcch_start_index)
* case 0
* G = 272
* case 1
* G = 248
* case 2
* G = 224
* case 3
* G = 200
*/
npdcch_scrambling_NB_IoT(
frame_parms,
npdcch,
//G,
//q = nf mod 2 (TS 36.211 ch 10.2.3.1) with nf = number of frame
//slot_id
);
// Now do modulation // Now do modulation
if (frame_parms->mode1_flag==1) if (frame_parms->mode1_flag==1)
...@@ -2235,6 +2274,18 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2235,6 +2274,18 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
} }
//NB-IoT
npdcch_modulation_NB_IoT(
txdataF,
AMP,
frame_parms,
//no symbol
//npdcch0???
//RB_ID --> statically get from the higher layer (may included in the dl_frame params)
);
#ifdef DEBUG_DCI_ENCODING #ifdef DEBUG_DCI_ENCODING
printf(" PDCCH Interleaving\n"); printf(" PDCCH Interleaving\n");
#endif #endif
...@@ -2243,6 +2294,9 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2243,6 +2294,9 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
// This is the interleaving procedure defined in 36-211, first part of Section 6.8.5 // This is the interleaving procedure defined in 36-211, first part of Section 6.8.5
pdcch_interleaving(frame_parms,&y[0],&wbar[0],num_pdcch_symbols,mi); pdcch_interleaving(frame_parms,&y[0],&wbar[0],num_pdcch_symbols,mi);
//in NB-IoT the interleaving is done directly with the encoding procedure
mprime=0; mprime=0;
nsymb = (frame_parms->Ncp==0) ? 14:12; nsymb = (frame_parms->Ncp==0) ? 14:12;
re_offset = frame_parms->first_carrier_offset; re_offset = frame_parms->first_carrier_offset;
......
...@@ -286,6 +286,55 @@ typedef struct { ...@@ -286,6 +286,55 @@ typedef struct {
} LTE_eNB_DLSCH_t; } LTE_eNB_DLSCH_t;
//NB-IoT new structure for NPDCCH
typedef struct
{
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
int32_t *txdataF[8];
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
int32_t **ue_spec_bf_weights[4];
/// dl channel estimates (estimated from ul channel estimates)
int32_t **calib_dl_ch_estimates;
/// Allocated RNTI (0 means DLSCH_t is not currently used)
uint16_t rnti;
/// Active flag for baseband transmitter processing
uint8_t active;
/// Indicator of TX activation per subframe. Used during PUCCH detection for ACK/NAK.
uint8_t subframe_tx[10];
/// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK.
uint8_t nCCE[10];
/// Current HARQ process id
uint8_t current_harq_pid;
/// Process ID's per subframe. Used to associate received ACKs on PUSCH/PUCCH to DLSCH harq process ids
uint8_t harq_ids[10];
/// Window size (in outgoing transport blocks) for fine-grain rate adaptation
uint8_t ra_window_size;
/// First-round error threshold for fine-grain rate adaptation
uint8_t error_threshold;
/// Pointers to 8 HARQ processes for the DLSCH
LTE_DL_eNB_HARQ_t *harq_processes[8];
/// Number of soft channel bits
uint32_t G;
/// Codebook index for this dlsch (0,1,2,3)
uint8_t codebook_index;
/// Maximum number of HARQ processes (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Mdlharq;
/// Maximum number of HARQ rounds
uint8_t Mlimit;
/// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17)
uint8_t Kmimo;
/// Nsoft parameter related to UE Category
uint32_t Nsoft;
/// amplitude of PDSCH (compared to RS) in symbols without pilots
int16_t sqrt_rho_a;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t sqrt_rho_b;
}NB_IoT_eNB_NPDCCH_t;
#define PUSCH_x 2 #define PUSCH_x 2
#define PUSCH_y 3 #define PUSCH_y 3
......
...@@ -428,6 +428,7 @@ typedef struct { ...@@ -428,6 +428,7 @@ typedef struct {
UE_rxtx_proc_t proc_rxtx[2]; UE_rxtx_proc_t proc_rxtx[2];
} UE_proc_t; } UE_proc_t;
/// Top-level PHY Data Structure for eNB /// Top-level PHY Data Structure for eNB
typedef struct PHY_VARS_eNB_s { typedef struct PHY_VARS_eNB_s {
/// Module ID indicator for this instance /// Module ID indicator for this instance
...@@ -474,7 +475,10 @@ typedef struct PHY_VARS_eNB_s { ...@@ -474,7 +475,10 @@ typedef struct PHY_VARS_eNB_s {
LTE_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX]; LTE_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX];
LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX]; LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX];
//NB-IoT------------------------
NB_IoT_eNB_NPBCH npbch; NB_IoT_eNB_NPBCH npbch;
NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAC_NB_IoT]; //check the max size of this array
/// cell-specific reference symbols /// cell-specific reference symbols
uint32_t lte_gold_table[20][2][14]; uint32_t lte_gold_table[20][2][14];
......
...@@ -1008,6 +1008,15 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d ...@@ -1008,6 +1008,15 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
// Initialize indicator for first SR (to be cleared after ConnectionSetup is acknowledged) // Initialize indicator for first SR (to be cleared after ConnectionSetup is acknowledged)
eNB->first_sr[(uint32_t)UE_id] = 1; eNB->first_sr[(uint32_t)UE_id] = 1;
/*
* In FAPI style we don-t need to process the RAR because we have all the parameters for getting the MSG3 given by the
* UL_CONFIG.request
* 1) this data are given at the same time with the DLSCH PDU containing the RAR
* 2) wee need to do a mapping of this parameters OAI->FAPI
*/
generate_eNB_ulsch_params_from_rar(DLSCH_pdu, generate_eNB_ulsch_params_from_rar(DLSCH_pdu,
frame, frame,
subframe, subframe,
...@@ -1089,6 +1098,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d ...@@ -1089,6 +1098,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
LOG_D(PHY,"Generating DLSCH/PDSCH %d\n",ra_flag); LOG_D(PHY,"Generating DLSCH/PDSCH %d\n",ra_flag);
// 36-212 // 36-212
start_meas(&eNB->dlsch_encoding_stats); start_meas(&eNB->dlsch_encoding_stats);
//encoding
eNB->te(eNB, eNB->te(eNB,
DLSCH_pdu, DLSCH_pdu,
num_pdcch_symbols, num_pdcch_symbols,
...@@ -1100,6 +1110,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d ...@@ -1100,6 +1110,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
stop_meas(&eNB->dlsch_encoding_stats); stop_meas(&eNB->dlsch_encoding_stats);
// 36-211 // 36-211
start_meas(&eNB->dlsch_scrambling_stats); start_meas(&eNB->dlsch_scrambling_stats);
//scrambling
dlsch_scrambling(fp, dlsch_scrambling(fp,
0, 0,
dlsch, dlsch,
...@@ -1118,6 +1129,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d ...@@ -1118,6 +1129,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
start_meas(&eNB->dlsch_modulation_stats); start_meas(&eNB->dlsch_modulation_stats);
//modulation
dlsch_modulation(eNB, dlsch_modulation(eNB,
eNB->common_vars.txdataF[0], eNB->common_vars.txdataF[0],
AMP, AMP,
......
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