Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
6f4d5db7
Commit
6f4d5db7
authored
Jun 22, 2017
by
Michele Paffetti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put relevant comment for starting the implementation of physical prcedures. Code not compile
parent
a6507165
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
213 additions
and
57 deletions
+213
-57
openair1/PHY/LTE_TRANSPORT/dci.c
openair1/PHY/LTE_TRANSPORT/dci.c
+54
-0
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+49
-0
openair1/PHY/defs.h
openair1/PHY/defs.h
+4
-0
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+12
-0
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
+94
-57
No files found.
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
6f4d5db7
...
...
@@ -2045,6 +2045,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
uint32_t
n_rnti
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
//NB_IoT_eNB_NPDCCH_t npdcch,
int32_t
**
txdataF
,
uint32_t
subframe
)
{
...
...
@@ -2131,11 +2132,24 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
#endif
if
(
dci_alloc
[
i
].
firstCCE
>=
0
)
{
//encoding
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
);
//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,
//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
if
(
frame_parms
->
mode1_flag
==
1
)
...
...
@@ -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
printf
(
" PDCCH Interleaving
\n
"
);
#endif
...
...
@@ -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
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
;
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
re_offset
=
frame_parms
->
first_carrier_offset
;
...
...
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
6f4d5db7
...
...
@@ -286,6 +286,55 @@ typedef struct {
}
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_y 3
...
...
openair1/PHY/defs.h
View file @
6f4d5db7
...
...
@@ -428,6 +428,7 @@ typedef struct {
UE_rxtx_proc_t
proc_rxtx
[
2
];
}
UE_proc_t
;
/// Top-level PHY Data Structure for eNB
typedef
struct
PHY_VARS_eNB_s
{
/// Module ID indicator for this instance
...
...
@@ -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_ptr
[
NUMBER_OF_UE_MAX
];
//NB-IoT------------------------
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
uint32_t
lte_gold_table
[
20
][
2
][
14
];
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
6f4d5db7
...
...
@@ -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)
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
,
frame
,
subframe
,
...
...
@@ -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
);
// 36-212
start_meas
(
&
eNB
->
dlsch_encoding_stats
);
//encoding
eNB
->
te
(
eNB
,
DLSCH_pdu
,
num_pdcch_symbols
,
...
...
@@ -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
);
// 36-211
start_meas
(
&
eNB
->
dlsch_scrambling_stats
);
//scrambling
dlsch_scrambling
(
fp
,
0
,
dlsch
,
...
...
@@ -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
);
//modulation
dlsch_modulation
(
eNB
,
eNB
->
common_vars
.
txdataF
[
0
],
AMP
,
...
...
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
View file @
6f4d5db7
...
...
@@ -461,64 +461,70 @@ void NB_generate_eNB_dlsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,Sched
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
int
frame
=
proc
->
frame_tx
;
int
subframe
=
proc
->
subframe_tx
;
DCI_CONTENT
*
DCI_Content
;
DCI_CONTENT
DCI_Content
[
2
];
//max number of DCI in a single subframe = 2 (may put this as a global variable)
DCI_Content
=
(
DCI_CONTENT
*
)
malloc
(
sizeof
(
DCI_CONTENT
));
//
DCI_Content = (DCI_CONTENT*) malloc(sizeof(DCI_CONTENT));
// In NB-IoT, there is no DCI for SI, we might use the scheduling infomation from SIB1-NB to get the phyical layer configuration.
//mapping the fapi parameters to the oai parameters
for
(
int
i
=
0
;
i
<
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
number_dci
;
i
++
){
switch
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DCI_Format
){
case
DCIFormatN1_RAR
:
//DCI format N1 to RAR
DCI_Content
->
DCIN1_RAR
.
type
=
1
;
DCI_Content
->
DCIN1_RAR
.
orderIndicator
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
npdcch_order_indication
;
DCI_Content
->
DCIN1_RAR
.
Scheddly
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
scheduling_delay
;
DCI_Content
->
DCIN1_RAR
.
ResAssign
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
resource_assignment
;
DCI_Content
->
DCIN1_RAR
.
mcs
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
mcs
;
DCI_Content
->
DCIN1_RAR
.
ndi
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
new_data_indicator
;
DCI_Content
->
DCIN1_RAR
.
HARQackRes
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
harq_ack_resource
;
DCI_Content
->
DCIN1_RAR
.
DCIRep
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
dci_subframe_repetition_number
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
type
=
1
;
//check if this work
DCI_Content
[
i
]
->
DCIN1_RAR
.
orderIndicator
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
[
i
]
->
npdcch_pdu
.
npdcch_pdu_rel13
.
npdcch_order_indication
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
Scheddly
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
scheduling_delay
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
ResAssign
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
resource_assignment
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
mcs
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
mcs
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
ndi
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
new_data_indicator
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
HARQackRes
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
harq_ack_resource
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
DCIRep
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
dci_subframe_repetition_number
;
// configure dlsch parameters and CCE index
LOG_D
(
PHY
,
"Generating dlsch params for RA_RNTI
\n
"
);
NB_generate_eNB_dlsch_params_from_dci
(
frame
,
subframe
,
DCI_Content
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
rnti
,
DCI_Content
[
i
]
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
rnti
,
DCIFormatN1_RAR
,
&
eNB
->
dlsch_ra
,
fp
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
aggregation_level
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
NUM_DCI
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
aggregation_level
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
number_dci
);
break
;
case
DCIFormatN1
:
//DCI format N1 to DLSCH
DCI_Content
->
DCIN1
.
type
=
1
;
DCI_Content
->
DCIN1
.
orderIndicator
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
npdcch_order_indication
;
DCI_Content
->
DCIN1
.
Scheddly
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
scheduling_delay
;
DCI_Content
->
DCIN1
.
ResAssign
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
resource_assignment
;
DCI_Content
->
DCIN1
.
mcs
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
mcs
;
DCI_Content
->
DCIN1
.
RepNum
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
repetition_number
;
DCI_Content
->
DCIN1
.
ndi
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
new_data_indicator
;
DCI_Content
->
DCIN1
.
HARQackRes
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
harq_ack_resource
;
DCI_Content
->
DCIN1
.
DCIRep
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
dci_subframe_repetition_number
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
type
=
1
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
orderIndicator
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
npdcch_order_indication
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
Scheddly
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
scheduling_delay
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
ResAssign
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
resource_assignment
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
mcs
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
mcs
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
ndi
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
new_data_indicator
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
HARQackRes
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
harq_ack_resource
;
DCI_Content
[
i
]
->
DCIN1_RAR
.
DCIRep
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
dci_subframe_repetition_number
;
NB_generate_eNB_dlsch_params_from_dci
(
frame
,
subframe
,
DCI_Content
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
rnti
,
DCI_Content
[
i
]
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
rnti
,
DCIFormatN0
,
eNB
->
dlsch
[(
uint8_t
)
UE_id
],
fp
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
aggregation_level
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
NUM_DCI
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
aggregation_level
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
number_dci
);
break
;
/*reserve for the N2 DCI*/
/*TODO reserve for the N2 DCI*/
case
DCIFormatN2_Pag
:
LOG_I
(
PHY
,
"Paging is not implemented, DCIFormatN2_Pag cannot be elaborated
\n
"
);
break
;
}
}
...
...
@@ -531,42 +537,45 @@ void NB_generate_eNB_ulsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,Sched_
int
harq_pid
=
0
;
DCI_CONTENT
*
DCI_Content
;
DCI_CONTENT
DCI_Content
[
2
];
//max number of DCI in a single subframe = 2 (may put this as a global variable)
for
(
int
i
=
0
;
i
<
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
number_of_dci
;
i
++
)
{
DCI_Content
=
(
DCI_CONTENT
*
)
malloc
(
sizeof
(
DCI_CONTENT
));
//mapping the fapi parameters to the OAI parameters
DCI_Content
->
DCIN0
.
type
=
0
;
DCI_Content
->
DCIN0
.
scind
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
subcarrier_indication
;
DCI_Content
->
DCIN0
.
ResAssign
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
subcarrier_indication
;
DCI_Content
->
DCIN0
.
mcs
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
mcs
;
DCI_Content
->
DCIN0
.
ndi
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
new_data_indicator
;
DCI_Content
->
DCIN0
.
Scheddly
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
scheduling_delay
;
DCI_Content
->
DCIN0
.
RepNum
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
repetition_number
;
DCI_Content
->
DCIN0
.
rv
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
redudancy_version
;
DCI_Content
->
DCIN0
.
DCIRep
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
dci_subframe_repetition_number
;
DCI_Content
[
i
]
->
DCIN0
.
type
=
0
;
DCI_Content
[
i
]
->
DCIN0
.
scind
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
subcarrier_indication
;
DCI_Content
[
i
]
->
DCIN0
.
ResAssign
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
subcarrier_indication
;
DCI_Content
[
i
]
->
DCIN0
.
mcs
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
mcs
;
DCI_Content
[
i
]
->
DCIN0
.
ndi
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
new_data_indicator
;
DCI_Content
[
i
]
->
DCIN0
.
Scheddly
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
scheduling_delay
;
DCI_Content
[
i
]
->
DCIN0
.
RepNum
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
repetition_number
;
DCI_Content
[
i
]
->
DCIN0
.
rv
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
redudancy_version
;
DCI_Content
[
i
]
->
DCIN0
.
DCIRep
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
dci_subframe_repetition_number
;
/*Log for generate ULSCH DCI*/
NB_generate_eNB_ulsch_params_from_dci
(
eNB
,
proc
,
DCI_Content
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
rnti
,
DCI_Content
[
i
]
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
rnti
,
DCIFormatN0
,
UE_id
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
aggregation_level
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
NUM_DCI
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
hi_dci0_pdu_list
->
npdcch_dci_pdu
.
npdcch_dci_pdu_rel13
.
aggregation_level
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
number_of_dci
);
//LOG for ULSCH DCI Resource allocation
if
((
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
rnti
>=
CBA_RNTI
)
&&
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
rnti
<
P_RNTI
))
eNB
->
ulsch
[(
uint32_t
)
UE_id
]
->
harq_processes
[
harq_pid
]
->
subframe_cba_scheduling_flag
=
1
;
else
//CBA is not used in NB-IoT
// if ((Sched_Rsp->NB_DL.NB_DCI.UL_DCI.npdcch_dci_pdu_rel13.rnti >= CBA_RNTI) && (Sched_Rsp->NB_DL.NB_DCI.UL_DCI.npdcch_dci_pdu_rel13.rnti < P_RNTI))
// eNB->ulsch[(uint32_t)UE_id]->harq_processes[harq_pid]->subframe_cba_scheduling_flag = 1;
// else
eNB
->
ulsch
[(
uint32_t
)
UE_id
]
->
harq_processes
[
harq_pid
]
->
subframe_scheduling_flag
=
1
;
}
}
...
...
@@ -661,11 +670,13 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
ul_frame
=
frame
+
(
ul_subframe
>=
6
?
1
:
0
);
harq_pid
=
((
ul_frame
<<
1
)
+
ul_subframe
)
&
7
;
// NPDSCH management from nfapi
// what should be figurate this week
if
(
Sched_Rsp
->
NB_DL
.
NB_DLSCH
.
NPDSCH_pdu
.
segments
)
// check for BCCH
//rnti_type = 0 BCCH information
//rnti_type = 1 Other
if
(
Sched_Rsp
->
NB_DL
.
NB_DLSCH
.
ndlsch
.
rnti_type
==
0
)
{
/*TODO: NPDSCH procedures for NB-IoT*/
/*TODO: NPDSCH procedures for
BCCH for
NB-IoT*/
//npdsch_procedures();
}
...
...
@@ -686,12 +697,15 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
eNB
->
dlsch
[
i
][
0
]
->
subframe_tx
[
subframe
]
=
0
;
}
if
(
Sched_Rsp
->
NB_DL
.
NB_DCI
!=
NULL
)
{
/*Loop over all the dci to generate DLSCH allocation, there is only 1 or 2 DCIs for NB-IoT in the same time*/
// Add dci fapi structure for contain two dcis
/*Also Packed the DCI here*/
if
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
rnti
<=
P_RNTI
)
for
(
int
i
=
0
;
i
<
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
number_dci
;
i
++
)
{
if
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
dl_config_pdu_list
->
npdcch_pdu
.
npdcch_pdu_rel13
.
rnti
<=
P_RNTI
)
{
//is not system iformation but cound be paging
//in any case we generate dlsch for not system information
...
...
@@ -700,21 +714,44 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
else
UE_id
=
0
;
//inside we hve nFAPI to OAI parameters
//inside we h
a
ve nFAPI to OAI parameters
NB_generate_eNB_dlsch_params
(
eNB
,
proc
,
Sched_Rsp
,
UE_id
);
}
/* Apply physicalConfigDedicated if needed, don't know if needed in NB-IoT or not
This is for UEs that have received this IE, which changes these DL and UL configuration, we apply after a delay for the eNodeB UL parameters
phy_config_dedicated_eNB_step2(eNB);*/
for
(
int
i
=
0
;
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
number_of_dci
;
i
++
)
{
if
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DCI_Format
==
DCIFormatN0
)
// this is a ULSCH allocation
{
UE_id
=
find_ue
((
int16_t
)
Sched_Rsp
->
NB_DL
.
NB_DCI
.
UL_DCI
.
npdcch_dci_pdu_rel13
.
rnti
,
eNB
);
NB_generate_eNB_ulsch_params
(
eNB
,
proc
,
Sched_Rsp
,
UE_id
);
}
/*If we have DCI to generate do it now TODO : have a generate dci top for NB_IoT */
//NB_generate_dci_top();
}
/*If we have DCI to generate do it now TODO : have a generate dci top for NB_IoT */
//to be modified but inside we have the nuew function for dci transmission
generate_dci_top
();
}
//now we should check if Sched_Rsp contains data
//rnti_type = 0 BCCH information
//rnti_type = 1 Other
if
(
Sched_Rsp
->
NB_DL
.
NB_DLSCH
.
ndlsch
.
rnti_type
!=
0
)
{
//we not need between RAR PDUS
/*TODO: NPDSCH procedures for BCCH for NB-IoT*/
//npdsch_procedures();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment