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
e8451cfd
Commit
e8451cfd
authored
Jun 16, 2017
by
Michele Paffetti
Browse files
Options
Browse Files
Download
Plain Diff
merge with nick version. Code compile
parents
4729dd67
2ccbef43
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
217 additions
and
97 deletions
+217
-97
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
+16
-12
openair1/PHY/LTE_TRANSPORT/dci_tools_nb_iot.c
openair1/PHY/LTE_TRANSPORT/dci_tools_nb_iot.c
+4
-7
openair1/SCHED/defs_nb_iot.h
openair1/SCHED/defs_nb_iot.h
+26
-0
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
+91
-65
openair2/LAYER2/MAC/eNB_scheduler_RA_nb_iot.c
openair2/LAYER2/MAC/eNB_scheduler_RA_nb_iot.c
+2
-5
openair2/LAYER2/MAC/extern.h
openair2/LAYER2/MAC/extern.h
+6
-2
openair2/LAYER2/MAC/vars.h
openair2/LAYER2/MAC/vars.h
+2
-0
openair2/PHY_INTERFACE/IF_Module_nb_iot.c
openair2/PHY_INTERFACE/IF_Module_nb_iot.c
+5
-4
openair2/PHY_INTERFACE/IF_Module_nb_iot.h
openair2/PHY_INTERFACE/IF_Module_nb_iot.h
+4
-2
record.txt
record.txt
+3
-0
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+48
-0
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+10
-0
No files found.
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
View file @
e8451cfd
...
...
@@ -110,23 +110,25 @@ struct DCIFormatN1_RA{
typedef
struct
DCIFormatN1_RA
DCIFormatN1_RA_t
;
/// DCI Format Type N1 for
RAR
/// DCI Format Type N1 for
User data
struct
DCIFormatN1_RAR
{
/// type = 0 => DCI Format N0, type = 1 => DCI Format N1,
1
bits
/// type = 0 => DCI Format N0, type = 1 => DCI Format N1,
1
bits
uint8_t
type
;
//NPDCCH order indicator (set to 0),1 bits
//NPDCCH order indicator (set to 0),
1 bits
uint8_t
orderIndicator
;
// Scheduling Delay,
3 bits
// Scheduling Delay,3 bits
uint8_t
Scheddly
;
// Resourse Assignment (RU Assignment),
3 bits
// Resourse Assignment (RU Assignment),3 bits
uint8_t
ResAssign
;
// Modulation and Coding Scheme,
4 bits
// Modulation and Coding Scheme,4 bits
uint8_t
mcs
;
// Repetition Number,
4 bits
// Repetition Number,4 bits
uint8_t
RepNum
;
// Reserved 5 bits
uint8_t
Reserved
;
// DCI subframe repetition Number, 2 bits
// New Data Indicator,1 bits,reserved in the RAR
uint8_t
ndi
;
// HARQ-ACK resource,4 bits,reserved in the RAR
uint8_t
HARQackRes
;
// DCI subframe repetition Number,2 bits
uint8_t
DCIRep
;
};
...
...
@@ -203,10 +205,12 @@ typedef union DCI_CONTENT {
#define sizeof_DCIN0_t 23
struct
DCIN1_RAR
{
// Reserved 5 bits like payload
uint8_t
Reserved
:
5
;
// DCI subframe repetition Number, 2 bits
uint8_t
DCIRep
:
2
;
// HARQ-ACK resource,4 bits
uint8_t
HARQackRes
:
4
;
// New Data Indicator,1 bits
uint8_t
ndi
:
1
;
// Repetition Number, 4 bits
uint8_t
RepNum
:
4
;
// Modulation and Coding Scheme, 4 bits
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools_nb_iot.c
View file @
e8451cfd
...
...
@@ -73,9 +73,6 @@ int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB_NB *eNB,
)
{
LTE_eNB_ULSCH_t
*
ulsch
=
eNB
->
ulsch
[
UE_id
];
NB_DL_FRAME_PARMS
*
frame_parms
=
&
eNB
->
frame_parms
;
int
subframe
=
proc
->
subframe_tx
;
void
*
ULSCH_DCI_NB
=
NULL
;
DCI_PDU_NB
*
DCI_pdu
;
...
...
@@ -169,8 +166,6 @@ int NB_generate_eNB_dlsch_params_from_dci(int frame,
uint8_t
mcs
;
// Repetition Number, 4 bits
uint8_t
RepNum
;
// Reserved 5 bits
uint8_t
Reserved
;
// DCI subframe repetition Number, 2 bits
uint8_t
DCIRep
;
// New Data Indicator,1 bits
...
...
@@ -201,7 +196,8 @@ int NB_generate_eNB_dlsch_params_from_dci(int frame,
ResAssign
=
DCI_Content
->
DCIN1_RAR
.
ResAssign
;
mcs
=
DCI_Content
->
DCIN1_RAR
.
mcs
;
RepNum
=
DCI_Content
->
DCIN1_RAR
.
RepNum
;
Reserved
=
DCI_Content
->
DCIN1_RAR
.
Reserved
;
ndi
=
DCI_Content
->
DCIN1_RAR
.
ndi
;
HARQackRes
=
DCI_Content
->
DCIN1_RAR
.
HARQackRes
;
DCIRep
=
DCI_Content
->
DCIN1_RAR
.
DCIRep
;
/*Packed DCI here*/
...
...
@@ -211,8 +207,9 @@ int NB_generate_eNB_dlsch_params_from_dci(int frame,
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
ResAssign
=
ResAssign
;
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
mcs
=
mcs
;
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
RepNum
=
RepNum
;
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
ndi
=
ndi
;
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
HARQackRes
=
HARQackRes
;
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
DCIRep
=
DCIRep
;
((
DCIN1_RAR_t
*
)
DLSCH_DCI_NB
)
->
Reserved
=
Reserved
;
DCI_pdu
->
Num_dci
=
Num_dci
;
...
...
openair1/SCHED/defs_nb_iot.h
0 → 100644
View file @
e8451cfd
#ifndef __openair_SCHED_NB_IOT_H__
#define __openair_SCHED_NB_IOT_H__
#include "PHY/defs.h"
#include "PHY/defs_nb_iot.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
/*Processing the ue-specific resources for uplink in NB-IoT*/
void
NB_phy_procedures_eNB_uespec_RX
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
);
/* For NB-IoT, we put NPBCH in later part, since it would be scheduled by MAC scheduler,this generates NRS/NPSS/NSSS*/
void
NB_common_signal_procedures
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
);
/*Generate the ulsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
void
NB_generate_eNB_ulsch_params
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
Sched_Rsp_t
*
Sched_Rsp
,
const
int
UE_id
);
/*Generate the dlsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
void
NB_generate_eNB_dlsch_params
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
Sched_Rsp_t
*
Sched_Rsp
,
const
int
UE_id
);
/*Process all the scheduling result from MAC and also common signals.*/
void
NB_phy_procedures_eNB_TX
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
int
do_meas
);
#endif
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
View file @
e8451cfd
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file phy_procedures_lte_eNB.c
* \brief Implementation of eNB procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger, N. Nikaein, X. Foukas
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,navid.nikaein@eurecom.fr, x.foukas@sms.ed.ac.uk
* \note
* \warning
*/
//NB-IoT test
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
...
...
@@ -44,6 +11,9 @@
#include "SCHED/phy_procedures_emos.h"
#endif
// for NB-IoT
#include "SCHED/defs_nb_iot.h"
//#define DEBUG_PHY_PROC (Already defined in cmake)
//#define DEBUG_ULSCH
...
...
@@ -56,7 +26,7 @@
#include "assertions.h"
#include "msc.h"
#include "PHY/defs_nb_iot.h"
#include <time.h>
#if defined(ENABLE_ITTI)
...
...
@@ -155,10 +125,10 @@ void NB_common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
void
NB_phy_procedures_eNB_uespec_RX
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
const
relaying_type_t
r_type
)
void
NB_phy_procedures_eNB_uespec_RX
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
{
//RX processing for ue-specific resources (i
UNUSED
(
r_type
);
uint32_t
ret
=
0
,
i
,
j
,
k
;
uint32_t
harq_pid
,
harq_idx
,
round
;
int
sync_pos
;
...
...
@@ -174,7 +144,6 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
UL_IND_t
UL_INFO
;
UL_INFO
.
module_id
=
eNB
->
Mod_id
;
UL_INFO
.
CC_id
=
eNB
->
CC_id
;
UL_INFO
.
frame
=
frame
;
...
...
@@ -487,41 +456,73 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
void
NB_generate_eNB_dlsch_params
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
Sched_Rsp_t
*
Sched_Rsp
,
const
int
UE_id
)
{
//
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
int
frame
=
proc
->
frame_tx
;
//int subframe = proc->subframe_tx;
int
subframe
=
proc
->
subframe_tx
;
DCI_CONTENT
*
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.
if
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DCI_Format
==
DCIFormatN1_RAR
)
// This is format 1A allocation for RA
{
//mapping the fapi parameters to the oai parameters
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
.
RepNum
=
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
repetition_number
;
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
;
// configure dlsch parameters and CCE index
LOG_D
(
PHY
,
"Generating dlsch params for RA_RNTI
\n
"
);
//NB_generate_eNB_dlsch_params_from_dci();
NB_generate_eNB_dlsch_params_from_dci
(
frame
,
subframe
,
DCI_Content
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
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
);
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
;
NB_generate_eNB_dlsch_params_from_dci
(
frame
,
subframe
,
DCI_Content
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
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
);
break
;
/*reserve for the N2 DCI*/
//eNB->dlsch_ra->nCCE[subframe] = dci_alloc->firstCCE;
/*Log for common DCI*/
}
else
if
((
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DCI_Format
!=
DCIFormatN0
)
&&
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DCI_Format
!=
DCIFormatN2_Ind
)
&&
(
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DCI_Format
!=
DCIFormatN2_Pag
))
{
// this is a normal DLSCH allocation
if
(
UE_id
>=
0
)
{
LOG_D
(
PHY
,
"Generating dlsch params for RNTI %x
\n
"
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
rnti
);
//NB_generate_eNB_dlsch_params_from_dci();
/*Log for remaining DCI*/
//eNB->dlsch[(uint8_t)UE_id][0]->nCCE[subframe] = dci_alloc->firstCCE;
/*LOG for DCI resource allocation and some detail*/
}
else
{
LOG_D
(
PHY
,
"[eNB %"
PRIu8
"][PDSCH] Frame %d : No UE_id with corresponding rnti %"
PRIx16
", dropping DLSCH
\n
"
,
eNB
->
Mod_id
,
frame
,
Sched_Rsp
->
NB_DL
.
NB_DCI
.
DL_DCI
.
npdcch_pdu_rel13
.
rnti
);
}
}
}
...
...
@@ -529,9 +530,34 @@ 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
*
)
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
;
/*Log for generate ULSCH DCI*/
//NB_generate_eNB_ulsch_params_from_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
,
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
);
//LOG for ULSCH DCI Resource allocation
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA_nb_iot.c
View file @
e8451cfd
...
...
@@ -77,11 +77,9 @@ void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
RA_TEMPLATE_NB
*
RA_template
;
unsigned
char
i
,
harq_pid
,
round
;
int16_t
rrc_sdu_length
;
unsigned
char
lcid
,
offset
;
int
UE_id
=
-
1
;
unsigned
short
TBsize
=
-
1
;
unsigned
short
msg4_padding
,
msg4_post_padding
,
msg4_header
;
DCI_PDU_NB
*
DCI_pdu
;
unsigned
short
msg4_header
;
// start_meas(&eNB->schedule_ra);
...
...
@@ -89,7 +87,6 @@ void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
DCI_pdu
=
&
eNB
->
common_channels
[
CC_id
].
DCI_pdu
;
for
(
i
=
0
;
i
<
NB_RA_PROC_MAX
;
i
++
)
{
...
...
@@ -114,7 +111,7 @@ void NB_schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
((
DCIFormatN1_RAR_t
*
)
&
RA_template
->
RA_alloc_pdu1
[
0
])
->
ResAssign
=
0
;
((
DCIFormatN1_RAR_t
*
)
&
RA_template
->
RA_alloc_pdu1
[
0
])
->
mcs
=
0
;
//fixes?//fixes? base on CE levels?
((
DCIFormatN1_RAR_t
*
)
&
RA_template
->
RA_alloc_pdu1
[
0
])
->
RepNum
=
0
;
//fixes? base on CE levels?
((
DCIFormatN1_RAR_t
*
)
&
RA_template
->
RA_alloc_pdu1
[
0
])
->
Reserved
=
0
;
//
((DCIFormatN1_RAR_t*)&RA_template->RA_alloc_pdu1[0])->Reserved=0;
((
DCIFormatN1_RAR_t
*
)
&
RA_template
->
RA_alloc_pdu1
[
0
])
->
DCIRep
=
0
;
//fixes?
}
//New appoach for CCE allocaton, delete !CCE_allocation_infeasible..
...
...
openair2/LAYER2/MAC/extern.h
View file @
e8451cfd
...
...
@@ -38,7 +38,6 @@
#endif //USER_MODE
#include "PHY/defs.h"
#include "defs.h"
#include "defs_nb_iot.h"
#include "COMMON/mac_rrc_primitives.h"
#ifdef PHY_EMUL
//#include "SIMULATION/simulation_defs.h"
...
...
@@ -46,9 +45,13 @@
#include "PHY_INTERFACE/defs.h"
#include "RRC/LITE/defs.h"
//NB-IoT
#ifdef NB_IOT
#include "defs_nb_iot.h"
//NB-IoT
extern
IF_Module_t
*
if_inst
;
extern
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
#endif
extern
const
uint32_t
BSR_TABLE
[
BSR_TABLE_SIZE
];
//extern uint32_t EBSR_Level[63];
...
...
@@ -69,6 +72,7 @@ extern UE_MAC_INST *ue_mac_inst;
extern
MAC_RLC_XFACE
*
Mac_rlc_xface
;
extern
uint8_t
Is_rrc_registered
;
extern
eNB_ULSCH_INFO
eNB_ulsch_info
[
NUMBER_OF_eNB_MAX
][
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
// eNBxUE = 8x8
extern
eNB_DLSCH_INFO
eNB_dlsch_info
[
NUMBER_OF_eNB_MAX
][
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
// eNBxUE = 8x8
...
...
openair2/LAYER2/MAC/vars.h
View file @
e8451cfd
...
...
@@ -41,9 +41,11 @@
#include "PHY_INTERFACE/defs.h"
#include "COMMON/mac_rrc_primitives.h"
#ifdef NB_IOT
//NB-IoT
eNB_MAC_INST_NB
*
eNB_mac_inst_NB
;
IF_Module_t
*
if_inst
;
#endif
const
uint32_t
BSR_TABLE
[
BSR_TABLE_SIZE
]
=
{
0
,
10
,
12
,
14
,
17
,
19
,
22
,
26
,
31
,
36
,
42
,
49
,
57
,
67
,
78
,
91
,
105
,
125
,
146
,
171
,
200
,
234
,
274
,
321
,
376
,
440
,
515
,
603
,
706
,
826
,
967
,
1132
,
...
...
openair2/PHY_INTERFACE/IF_Module_nb_iot.c
View file @
e8451cfd
...
...
@@ -6,21 +6,22 @@
//called at initialization of L2
IF_Module_t
*
IF_Module_init_L2
(
void
)
// northbound IF-Module Interface
void
IF_Module_init_L2
(
void
)
// northbound IF-Module Interface
{
//mapping the IF-Module function to L2 definition
if_inst
->
UL_indication
=
UL_indication
;
return
if_inst
;
//
return if_inst;
}
//called at initialization of L1 (phy_init_lte_eNB)
IF_Module_t
*
IF_Module_init_L1
(
void
)
//southbound IF-Module Interface
void
IF_Module_init_L1
(
void
)
//southbound IF-Module Interface
{
//mapping the IF-module function to L1 definition
if_inst
->
schedule_response
=
schedule_response
;
if_inst
->
PHY_config_req
=
PHY_config_req
;
return
if_inst
;
//
return if_inst;
}
openair2/PHY_INTERFACE/IF_Module_nb_iot.h
View file @
e8451cfd
...
...
@@ -156,6 +156,8 @@ typedef struct{
typedef
struct
{
DCI_format_NB_t
DCI_Format
;
uint8_t
NUM_DCI
;
/*DL DCI*/
nfapi_dl_config_npdcch_pdu
DL_DCI
;
/*UL DCI*/
...
...
@@ -206,8 +208,8 @@ typedef struct IF_Module_s{
//int IF_Module_init(IF_Module_t *if_inst);
IF_Module_t
*
IF_Module_init_L1
(
void
);
IF_Module_t
*
IF_Module_init_L2
(
void
);
void
IF_Module_init_L1
(
void
);
void
IF_Module_init_L2
(
void
);
#endif
record.txt
View file @
e8451cfd
...
...
@@ -84,3 +84,6 @@ Comment: Complete the dci_tools the part configuring the PHY and do the pack of
Comment: Update the IF Module header file to fit the FAPI structure and types.
6/15
Comment: New RXTX defined for NB-IoT, use the FAPI parameters adapting to the physical layer parameters.
\ No newline at end of file
targets/RT/USER/lte-enb.c
View file @
e8451cfd
...
...
@@ -71,6 +71,10 @@
#include "../../SIMU/USER/init_lte.h"
//NB-IoT
#include "SCHED/defs_nb_iot.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
...
...
@@ -571,6 +575,50 @@ int wait_CCs(eNB_rxtx_proc_t *proc) {
return
(
0
);
}
/*NB-IoT rxtx*/
static
inline
int
NB_rxtx
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
UL_IND_t
UL_INFO
;
//not here but temp
start_meas
(
&
softmodem_stats_rxtx_sf
);
// ****************************************
// Common RX procedures subframe n
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5
)))
eNB
->
do_prach
(
eNB
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
// skip the comment for this moment
// phy_procedures_eNB_common_RX(eNB,proc);
// UE-specific RX processing for subframe n
NB_phy_procedures_eNB_uespec_RX
(
eNB
,
proc
);
// After stored the Upink information, process it and made it into FAPI style, also provide a tick to the scheduler
if
(
if_inst
->
UL_indication
)
if_inst
->
UL_indication
(
UL_INFO
);
// *****************************************
// TX processing for subframe n+4
// run PHY TX procedures the one after the other for all CCs to avoid race conditions
// (may be relaxed in the future for performance reasons)
// *****************************************
//if (wait_CCs(proc)<0) return(-1);
if
(
oai_exit
)
return
(
-
1
);
NB_phy_procedures_eNB_TX
(
eNB
,
proc
,
NULL
);
if
(
release_thread
(
&
proc
->
mutex_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
return
(
-
1
);
stop_meas
(
&
softmodem_stats_rxtx_sf
);
return
(
0
);
}
static
inline
int
rxtx
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
start_meas
(
&
softmodem_stats_rxtx_sf
);
...
...
targets/RT/USER/lte-softmodem.c
View file @
e8451cfd
...
...
@@ -51,6 +51,7 @@
#include "LAYER2/MAC/proto.h"
#include "RRC/LITE/vars.h"
#include "PHY_INTERFACE/vars.h"
#include "PHY_INTERFACE/defs_nb_iot.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
...
...
@@ -1623,6 +1624,10 @@ int main( int argc, char **argv ) {
PHY_vars_eNB_g
=
malloc
(
sizeof
(
PHY_VARS_eNB
**
));
PHY_vars_eNB_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_eNB
*
));
#ifdef NB_IOT
// do the initialization for the IF Module
if_inst
=
malloc
(
sizeof
(
IF_Module_t
*
));
#endif
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
=
init_lte_eNB
(
frame_parms
[
CC_id
],
0
,
frame_parms
[
CC_id
]
->
Nid_cell
,
node_function
[
CC_id
],
abstraction_flag
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
ue_dl_rb_alloc
=
0x1fff
;
...
...
@@ -1861,9 +1866,14 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g
[
0
][
CC_id
]
->
rf_map
.
chain
=
CC_id
+
chain_offset
;
}
}
else
{
#ifdef NB_IOT
printf
(
"Initializing IF Module in PHY layer
\n
"
);
IF_Module_init_L1
();
#endif
printf
(
"Initializing eNB threads
\n
"
);
init_eNB
(
node_function
,
node_timing
,
1
,
eth_params
,
single_thread_flag
,
wait_for_sync
);
number_of_cards
=
1
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
...
...
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