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
2300b9fc
Commit
2300b9fc
authored
Feb 16, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug correction for pilots
parent
a94b0562
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
143 additions
and
34 deletions
+143
-34
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+5
-1
openair1/PHY/LTE_REFSIG/defs_NB_IoT.h
openair1/PHY/LTE_REFSIG/defs_NB_IoT.h
+1
-1
openair1/PHY/LTE_REFSIG/lte_dl_cell_spec_NB_IoT.c
openair1/PHY/LTE_REFSIG/lte_dl_cell_spec_NB_IoT.c
+1
-1
openair1/PHY/LTE_REFSIG/lte_gold_NB_IoT.c
openair1/PHY/LTE_REFSIG/lte_gold_NB_IoT.c
+1
-1
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
+64
-5
openair1/PHY/LTE_TRANSPORT/dlsch_coding_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding_NB_IoT.c
+10
-10
openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
+2
-2
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
+13
-9
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+2
-2
openair1/PHY/defs.h
openair1/PHY/defs.h
+5
-0
openair1/PHY/defs_NB_IoT.h
openair1/PHY/defs_NB_IoT.h
+1
-1
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+38
-1
No files found.
openair1/PHY/INIT/lte_init.c
View file @
2300b9fc
...
@@ -1382,6 +1382,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
...
@@ -1382,6 +1382,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if
(
eNB
->
node_function
!=
NGFI_RRU_IF4p5
)
{
if
(
eNB
->
node_function
!=
NGFI_RRU_IF4p5
)
{
lte_gold
(
fp
,
eNB
->
lte_gold_table
,
fp
->
Nid_cell
);
lte_gold
(
fp
,
eNB
->
lte_gold_table
,
fp
->
Nid_cell
);
// NB-IoT testing
lte_gold_NB_IoT
(
fp
,
eNB
->
lte_gold_table_NB_IoT
,
fp
->
Nid_cell
);
//////////////////////////////////////////////////////////
generate_pcfich_reg_mapping
(
fp
);
generate_pcfich_reg_mapping
(
fp
);
generate_phich_reg_mapping
(
fp
);
generate_phich_reg_mapping
(
fp
);
...
@@ -1708,7 +1712,7 @@ int phy_init_lte_eNB_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
...
@@ -1708,7 +1712,7 @@ int phy_init_lte_eNB_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
if
(
eNB
->
node_function
!=
NGFI_RRU_IF4p5_NB_IoT
)
{
if
(
eNB
->
node_function
!=
NGFI_RRU_IF4p5_NB_IoT
)
{
lte_gold_NB_IoT
(
fp
,
eNB
->
lte_gold_table_NB_IoT
,
fp
->
Nid_cell
);
// lte_gold_NB_IoT(fp,eNB->lte_gold_table_NB_IoT,fp->Nid_cell); ****** uncomment when this function is used - 16/02/2018
// generate_pcfich_reg_mapping(fp);
// generate_pcfich_reg_mapping(fp);
// generate_phich_reg_mapping(fp);
// generate_phich_reg_mapping(fp);
...
...
openair1/PHY/LTE_REFSIG/defs_NB_IoT.h
View file @
2300b9fc
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
@param lte_gold_table pointer to table where sequences are stored
@param lte_gold_table pointer to table where sequences are stored
@param Nid_cell Cell Id for NB_IoT (to compute sequences for local and adjacent cells) */
@param Nid_cell Cell Id for NB_IoT (to compute sequences for local and adjacent cells) */
void
lte_gold_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
void
lte_gold_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table_NB_IoT
[
20
][
2
][
14
],
uint32_t
lte_gold_table_NB_IoT
[
20
][
2
][
14
],
uint16_t
Nid_cell
);
uint16_t
Nid_cell
);
...
...
openair1/PHY/LTE_REFSIG/lte_dl_cell_spec_NB_IoT.c
View file @
2300b9fc
...
@@ -77,7 +77,7 @@ int lte_dl_cell_spec_NB_IoT(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -77,7 +77,7 @@ int lte_dl_cell_spec_NB_IoT(PHY_VARS_eNB *phy_vars_eNB,
DevAssert
(
l
<
2
);
DevAssert
(
l
<
2
);
for
(
m
=
0
;
m
<
2
;
m
++
)
{
for
(
m
=
0
;
m
<
2
;
m
++
)
{
output
[
k
]
=
qpsk
[(
phy_vars_eNB
->
lte_gold_table
[
Ns
][
l
][
0
])
&
3
];
//TODO should be defined one for NB-IoT
output
[
k
]
=
qpsk
[(
phy_vars_eNB
->
lte_gold_table
_NB_IoT
[
Ns
][
l
][
0
])
&
3
];
//TODO should be defined one for NB-IoT
k
+=
6
;
k
+=
6
;
}
}
...
...
openair1/PHY/LTE_REFSIG/lte_gold_NB_IoT.c
View file @
2300b9fc
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
//#include "defs.h"
//#include "defs.h"
#include "PHY/LTE_REFSIG/defs_NB_IoT.h"
#include "PHY/LTE_REFSIG/defs_NB_IoT.h"
void
lte_gold_NB_IoT
(
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table_NB_IoT
[
20
][
2
][
14
],
uint16_t
Nid_cell
)
// Nid_cell = Nid_cell_NB_IoT
void
lte_gold_NB_IoT
(
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
lte_gold_table_NB_IoT
[
20
][
2
][
14
],
uint16_t
Nid_cell
)
// Nid_cell = Nid_cell_NB_IoT
{
{
unsigned
char
ns
,
l
,
Ncp
=
1
;
unsigned
char
ns
,
l
,
Ncp
=
1
;
unsigned
int
n
,
x1
,
x2
;
unsigned
int
n
,
x1
,
x2
;
...
...
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
View file @
2300b9fc
...
@@ -147,6 +147,9 @@ typedef enum {
...
@@ -147,6 +147,9 @@ typedef enum {
typedef
struct
{
typedef
struct
{
/// NB-IoT
/// NB-IoT
/// Allocated RNTI (0 means DLSCH_t is not currently used)
uint16_t
si_rnti
;
///(=0xfff4)
SCH_status_NB_IoT_t
status
;
SCH_status_NB_IoT_t
status
;
/// The scheduling the NPDCCH and the NPDSCH transmission TS 36.213 Table 16.4.1-1
/// The scheduling the NPDCCH and the NPDSCH transmission TS 36.213 Table 16.4.1-1
uint8_t
scheduling_delay
;
uint8_t
scheduling_delay
;
...
@@ -194,9 +197,60 @@ typedef struct {
...
@@ -194,9 +197,60 @@ typedef struct {
//this index will be used mainly for SI message buffer
//this index will be used mainly for SI message buffer
uint8_t
pdu_buffer_index
;
uint8_t
pdu_buffer_index
;
}
NB_IoT_DL_eNB_HARQ_t
;
}
NB_IoT_DL_eNB_SIB1_t
;
typedef
struct
{
/// NB-IoT
SCH_status_NB_IoT_t
status
;
/// The scheduling the NPDCCH and the NPDSCH transmission TS 36.213 Table 16.4.1-1
uint8_t
scheduling_delay
;
/// The number of the subframe to transmit the NPDSCH Table TS 36.213 Table 16.4.1.3-1 (Nsf) (NB. in this case is not the index Isf)
uint8_t
resource_assignment
;
/// is the index that determined the repeat number of NPDSCH through table TS 36.213 Table 16.4.1.3-2 / for SIB1-NB Table 16.4.1.3-3
uint8_t
repetition_number
;
/// Determined the ACK/NACK delay and the subcarrier allocation TS 36.213 Table 16.4.2
uint8_t
HARQ_ACK_resource
;
/// Determined the repetition number value 0-3 (2 biut carried by the FAPI NPDCCH)
uint8_t
dci_subframe_repetitions
;
/// modulation always QPSK Qm = 2
uint8_t
modulation
;
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
uint8_t
e
[
MAX_NUM_CHANNEL_BITS_NB_IoT
];
/// data after scrambling
uint8_t
s_e
[
MAX_NUM_CHANNEL_BITS_NB_IoT
];
//length of the table e
uint16_t
length_e
;
// new parameter
/// Tail-biting convolutional coding outputs
uint8_t
d
[
96
+
(
3
*
(
24
+
MAX_DL_SIZE_BITS_NB_IoT
))];
// new parameter
/// Sub-block interleaver outputs
uint8_t
w
[
3
*
3
*
(
MAX_DL_SIZE_BITS_NB_IoT
+
24
)];
// new parameter
/// Status Flag indicating for this DLSCH (idle,active,disabled)
//SCH_status_t status;
/// Transport block size
uint32_t
TBS
;
/// The payload + CRC size in bits, "B" from 36-212
uint32_t
B
;
/// Pointer to the payload
uint8_t
*
b
;
///pdu of the ndlsch message
uint8_t
*
pdu
;
/// Frame where current HARQ round was sent
uint32_t
frame
;
/// Subframe where current HARQ round was sent
uint32_t
subframe
;
/// Index of current HARQ round for this DLSCH
uint8_t
round
;
/// MCS format for this NDLSCH , TS 36.213 Table 16.4.1.5
uint8_t
mcs
;
// we don't have code block segmentation / crc attachment / concatenation in NB-IoT R13 36.212 6.4.2
// we don't have beamforming in NB-IoT
//this index will be used mainly for SI message buffer
uint8_t
pdu_buffer_index
;
}
NB_IoT_DL_eNB_HARQ_t
;
/*
typedef struct { // LTE_eNB_DLSCH_t
typedef struct { // LTE_eNB_DLSCH_t
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
uint32_t *txdataF[8];
uint32_t *txdataF[8];
...
@@ -217,7 +271,9 @@ typedef struct { // LTE_eNB_DLSCH_t
...
@@ -217,7 +271,9 @@ typedef struct { // LTE_eNB_DLSCH_t
/// First-round error threshold for fine-grain rate adaptation
/// First-round error threshold for fine-grain rate adaptation
uint8_t error_threshold;
uint8_t error_threshold;
/// Pointers to 8 HARQ processes for the DLSCH
/// Pointers to 8 HARQ processes for the DLSCH
NB_IoT_DL_eNB_HARQ_t
harq_process
;
NB_IoT_DL_eNB_HARQ_t harq_process2;
NB_IoT_DL_eNB_SIB1_t harq_process;
/// circular list of free harq PIDs (the oldest come first)
/// circular list of free harq PIDs (the oldest come first)
/// (10 is arbitrary value, must be > to max number of DL HARQ processes in LTE)
/// (10 is arbitrary value, must be > to max number of DL HARQ processes in LTE)
int harq_pid_freelist[10];
int harq_pid_freelist[10];
...
@@ -243,6 +299,7 @@ typedef struct { // LTE_eNB_DLSCH_t
...
@@ -243,6 +299,7 @@ typedef struct { // LTE_eNB_DLSCH_t
int16_t sqrt_rho_b;
int16_t sqrt_rho_b;
} NB_IoT_eNB_DLSCH_t;
} NB_IoT_eNB_DLSCH_t;
*/
typedef
struct
{
typedef
struct
{
...
@@ -547,9 +604,11 @@ typedef struct {
...
@@ -547,9 +604,11 @@ typedef struct {
uint8_t
subframe_tx
[
10
];
uint8_t
subframe_tx
[
10
];
/// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK.
/// First CCE of last PDSCH scheduling per subframe. Again used during PUCCH detection for ACK/NAK.
uint8_t
nCCE
[
10
];
uint8_t
nCCE
[
10
];
/
*in NB-IoT there is only 1 HARQ process for each UE therefore no pid is required*
/
/
//in NB-IoT there is only 1 HARQ process for each UE therefore no pid is required//
/
/// The only HARQ process for the DLSCH
/// The only HARQ process for the DLSCH
NB_IoT_DL_eNB_HARQ_t
*
harq_process
;
NB_IoT_DL_eNB_HARQ_t
*
harq_process
;
NB_IoT_DL_eNB_SIB1_t
harq_process_sib1
;
/// Number of soft channel bits
/// Number of soft channel bits
uint32_t
G
;
uint32_t
G
;
/// Maximum number of HARQ rounds
/// Maximum number of HARQ rounds
...
@@ -571,7 +630,7 @@ typedef struct {
...
@@ -571,7 +630,7 @@ typedef struct {
///indicates the starting OFDM symbol in the first slot of a subframe k for the NPDSCH transmission
///indicates the starting OFDM symbol in the first slot of a subframe k for the NPDSCH transmission
/// see FAPI/NFAPI specs Table 4-47
/// see FAPI/NFAPI specs Table 4-47
uint8_t
npdsch_start_symbol
;
uint8_t
npdsch_start_symbol
;
/
*SIB1-NB related parameters*
/
/
//SIB1-NB related parameters/
/
///flag for indicate if the current frame is the start of a new SIB1-NB repetition within the SIB1-NB period (0 = FALSE, 1 = TRUE)
///flag for indicate if the current frame is the start of a new SIB1-NB repetition within the SIB1-NB period (0 = FALSE, 1 = TRUE)
uint8_t
sib1_rep_start
;
uint8_t
sib1_rep_start
;
///the number of the frame within the 16 continuous frame in which sib1-NB is transmitted (1-8 = 1st, 2nd ecc..) (0 = not foresees a transmission)
///the number of the frame within the 16 continuous frame in which sib1-NB is transmitted (1-8 = 1st, 2nd ecc..) (0 = not foresees a transmission)
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding_NB_IoT.c
View file @
2300b9fc
...
@@ -85,7 +85,7 @@ void ccode_encode_npdsch_NB_IoT (int32_t numbits,
...
@@ -85,7 +85,7 @@ void ccode_encode_npdsch_NB_IoT (int32_t numbits,
int
dlsch_encoding_NB_IoT
(
unsigned
char
*
a
,
int
dlsch_encoding_NB_IoT
(
unsigned
char
*
a
,
NB_IoT_eNB_DLSCH_t
*
dlsch
,
NB_IoT_eNB_
N
DLSCH_t
*
dlsch
,
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)
unsigned
int
G
)
// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
unsigned
int
G
)
// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
{
{
...
@@ -94,12 +94,12 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
...
@@ -94,12 +94,12 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
unsigned
int
A
;
unsigned
int
A
;
uint8_t
RCC
;
uint8_t
RCC
;
A
=
dlsch
->
harq_process
.
TBS
;
// 680
A
=
dlsch
->
harq_process
_sib1
.
TBS
;
// 680
dlsch
->
harq_process
.
length_e
=
G
*
Nsf
;
// G*Nsf (number_of_subframes) = total number of bits to transmit G=236
dlsch
->
harq_process
_sib1
.
length_e
=
G
*
Nsf
;
// G*Nsf (number_of_subframes) = total number of bits to transmit G=236
int32_t
numbits
=
A
+
24
;
int32_t
numbits
=
A
+
24
;
if
(
dlsch
->
harq_process
.
round
==
0
)
{
// This is a new packet
if
(
dlsch
->
harq_process
_sib1
.
round
==
0
)
{
// This is a new packet
crc
=
crc24a_NB_IoT
(
a
,
A
)
>>
8
;
// CRC calculation (24 bits CRC)
crc
=
crc24a_NB_IoT
(
a
,
A
)
>>
8
;
// CRC calculation (24 bits CRC)
// CRC attachment to payload
// CRC attachment to payload
...
@@ -107,16 +107,16 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
...
@@ -107,16 +107,16 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
a
[
2
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
a
[
2
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
dlsch
->
harq_process
.
B
=
numbits
;
// The length of table b in bits
dlsch
->
harq_process
_sib1
.
B
=
numbits
;
// The length of table b in bits
memcpy
(
dlsch
->
harq_process
.
b
,
a
,
numbits
/
8
);
memcpy
(
dlsch
->
harq_process
_sib1
.
b
,
a
,
numbits
/
8
);
memset
(
dlsch
->
harq_process
.
d
,
LTE_NULL_NB_IoT
,
96
);
memset
(
dlsch
->
harq_process
_sib1
.
d
,
LTE_NULL_NB_IoT
,
96
);
ccode_encode_npdsch_NB_IoT
(
numbits
,
dlsch
->
harq_process
.
b
,
dlsch
->
harq_process
.
d
+
96
,
crc
);
// step 1 Tail-biting convolutional coding
ccode_encode_npdsch_NB_IoT
(
numbits
,
dlsch
->
harq_process
_sib1
.
b
,
dlsch
->
harq_process_sib1
.
d
+
96
,
crc
);
// step 1 Tail-biting convolutional coding
RCC
=
sub_block_interleaving_cc_NB_IoT
(
numbits
,
dlsch
->
harq_process
.
d
+
96
,
dlsch
->
harq_process
.
w
);
// step 2 interleaving
RCC
=
sub_block_interleaving_cc_NB_IoT
(
numbits
,
dlsch
->
harq_process
_sib1
.
d
+
96
,
dlsch
->
harq_process_sib1
.
w
);
// step 2 interleaving
lte_rate_matching_cc_NB_IoT
(
RCC
,
dlsch
->
harq_process
.
length_e
,
dlsch
->
harq_process
.
w
,
dlsch
->
harq_process
.
e
);
// step 3 Rate Matching
lte_rate_matching_cc_NB_IoT
(
RCC
,
dlsch
->
harq_process
_sib1
.
length_e
,
dlsch
->
harq_process_sib1
.
w
,
dlsch
->
harq_process_sib1
.
e
);
// step 3 Rate Matching
}
}
return
(
0
);
return
(
0
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_modulation_NB_IoT.c
View file @
2300b9fc
...
@@ -119,7 +119,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
...
@@ -119,7 +119,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
int16_t
amp
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_eNB_
DLSCH_t
*
dlsch0
,
NB_IoT_eNB_
NDLSCH_t
*
dlsch0
,
int
G
,
// number of bits per subframe
int
G
,
// number of bits per subframe
unsigned
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
short
NB_IoT_RB_ID
)
unsigned
short
NB_IoT_RB_ID
)
...
@@ -164,7 +164,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
...
@@ -164,7 +164,7 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
txdataF
,
txdataF
,
&
jj
,
&
jj
,
symbol_offset
,
symbol_offset
,
&
dlsch0
->
harq_process
.
s_e
[
G
*
npdsch_data_subframe
],
&
dlsch0
->
harq_process
_sib1
.
s_e
[
G
*
npdsch_data_subframe
],
pilots
,
pilots
,
amp
,
amp
,
id_offset
,
id_offset
,
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling_NB_IoT.c
View file @
2300b9fc
...
@@ -25,27 +25,31 @@
...
@@ -25,27 +25,31 @@
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "PHY/impl_defs_lte_NB_IoT.h"
#include "PHY/impl_defs_lte_NB_IoT.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/LTE_REFSIG/defs_NB_IoT.h"
#include "PHY/LTE_REFSIG/defs_NB_IoT.h"
void
dlsch_s
crambling_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
void
dlsch_s
ib1_scrambling_NB_IoT
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
NB_IoT_eNB_DLSCH_t
*
dlsch
,
NB_IoT_eNB_NDLSCH_t
*
dlsch
,
int
G
,
// total number of bits to transmit
int
tot_bits
,
// total number of bits to transmit
uint8_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Nf
,
// Nf is the frame number (0..9)
uint8_t
Ns
)
// slot number (0..19)
uint8_t
Ns
)
// slot number (0..19)
{
{
int
i
,
j
,
k
=
0
;
int
i
,
j
,
k
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
uint8_t
*
e
=
dlsch
->
harq_process
.
e
;
//uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
uint8_t
*
e
=
dlsch
->
harq_process
_sib1
.
e
;
//uint8_t *e=dlsch->harq_processes[dlsch->current_harq_pid]->e;
x2
=
(
dlsch
->
rnti
<<
14
)
+
((
Nf
%
2
)
<<
13
)
+
((
Ns
>>
1
)
<<
9
)
+
frame_parms
->
Nid_cell
;
//this is c_init in 36.211 Sec 10.2.3.1
x2
=
(
dlsch
->
harq_process_sib1
.
si_rnti
<<
15
)
+
(
frame_parms
->
Nid_cell
+
1
)
*
(
(
Nf
%
61
)
+
1
)
;
// 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
);
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
1
);
for
(
i
=
0
;
i
<
(
1
+
(
G
>>
5
));
i
++
)
{
for
(
i
=
0
;
i
<
(
1
+
(
tot_bits
>>
5
));
i
++
)
{
for
(
j
=
0
;
j
<
32
;
j
++
,
k
++
)
{
for
(
j
=
0
;
j
<
32
;
j
++
,
k
++
)
{
dlsch
->
harq_process
.
s_e
[
k
]
=
(
e
[
k
]
&
1
)
^
((
s
>>
j
)
&
1
);
dlsch
->
harq_process
_sib1
.
s_e
[
k
]
=
(
e
[
k
]
&
1
)
^
((
s
>>
j
)
&
1
);
}
}
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
0
);
s
=
lte_gold_generic_NB_IoT
(
&
x1
,
&
x2
,
0
);
...
...
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
2300b9fc
...
@@ -229,13 +229,13 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
...
@@ -229,13 +229,13 @@ int dlsch_modulation_NB_IoT(int32_t **txdataF,
int16_t
amp
,
int16_t
amp
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
uint8_t
control_region_size
,
// control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
NB_IoT_eNB_DLSCH_t
*
dlsch0
,
NB_IoT_eNB_
N
DLSCH_t
*
dlsch0
,
int
G
,
// number of bits per subframe
int
G
,
// number of bits per subframe
unsigned
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
npdsch_data_subframe
,
// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
unsigned
short
NB_IoT_RB_ID
);
unsigned
short
NB_IoT_RB_ID
);
int32_t
dlsch_encoding_NB_IoT
(
unsigned
char
*
a
,
int32_t
dlsch_encoding_NB_IoT
(
unsigned
char
*
a
,
NB_IoT_eNB_DLSCH_t
*
dlsch
,
NB_IoT_eNB_
N
DLSCH_t
*
dlsch
,
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)
unsigned
int
G
);
// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
unsigned
int
G
);
// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
...
...
openair1/PHY/defs.h
View file @
2300b9fc
...
@@ -326,6 +326,10 @@ typedef struct PHY_VARS_eNB_s {
...
@@ -326,6 +326,10 @@ typedef struct PHY_VARS_eNB_s {
/// cell-specific reference symbols
/// cell-specific reference symbols
uint32_t
lte_gold_table
[
20
][
2
][
14
];
uint32_t
lte_gold_table
[
20
][
2
][
14
];
/// cell-specific reference symbols
uint32_t
lte_gold_table_NB_IoT
[
20
][
2
][
14
];
/// UE-specific reference symbols (p=5), TM 7
/// UE-specific reference symbols (p=5), TM 7
uint32_t
lte_gold_uespec_port5_table
[
NUMBER_OF_UE_MAX
][
20
][
38
];
uint32_t
lte_gold_uespec_port5_table
[
NUMBER_OF_UE_MAX
][
20
][
38
];
...
@@ -507,6 +511,7 @@ typedef struct PHY_VARS_eNB_s {
...
@@ -507,6 +511,7 @@ typedef struct PHY_VARS_eNB_s {
NB_IoT_eNB_NPBCH_t
npbch
;
NB_IoT_eNB_NPBCH_t
npbch
;
NB_IoT_eNB_NDLSCH_t
*
ndlsch
[
NUMBER_OF_UE_MAX
];
NB_IoT_eNB_NDLSCH_t
*
ndlsch
[
NUMBER_OF_UE_MAX
];
NB_IoT_eNB_NDLSCH_t
ndlsch_SIB1
;
//////////////////// END /////////////////////////////////
//////////////////// END /////////////////////////////////
...
...
openair1/PHY/defs_NB_IoT.h
View file @
2300b9fc
...
@@ -530,7 +530,7 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
...
@@ -530,7 +530,7 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
void
(
*
do_prach
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
int
frame
,
int
subframe
);
void
(
*
do_prach
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
int
frame
,
int
subframe
);
void
(
*
fep
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
);
void
(
*
fep
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
);
int
(
*
td
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
);
int
(
*
td
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
);
int
(
*
te
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
,
uint8_t
*
,
uint8_t
,
NB_IoT_eNB_DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t_NB_IoT
*
,
time_stats_t_NB_IoT
*
,
time_stats_t_NB_IoT
*
);
int
(
*
te
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
,
uint8_t
*
,
uint8_t
,
NB_IoT_eNB_
N
DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t_NB_IoT
*
,
time_stats_t_NB_IoT
*
,
time_stats_t_NB_IoT
*
);
void
(
*
proc_uespec_rx
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
,
const
relaying_type_t_NB_IoT
r_type
);
void
(
*
proc_uespec_rx
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
,
const
relaying_type_t_NB_IoT
r_type
);
void
(
*
proc_tx
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
,
relaying_type_t_NB_IoT
r_type
,
PHY_VARS_RN_NB_IoT
*
rn
);
void
(
*
proc_tx
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
,
relaying_type_t_NB_IoT
r_type
,
PHY_VARS_RN_NB_IoT
*
rn
);
void
(
*
tx_fh
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
);
void
(
*
tx_fh
)(
struct
PHY_VARS_eNB_NB_IoT_s
*
eNB
,
eNB_rxtx_proc_NB_IoT_t
*
proc
);
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
2300b9fc
...
@@ -219,6 +219,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -219,6 +219,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
//LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
//LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
NB_IoT_eNB_NPBCH_t
*
broadcast_str
=
&
eNB
->
npbch
;
NB_IoT_eNB_NPBCH_t
*
broadcast_str
=
&
eNB
->
npbch
;
NB_IoT_eNB_NDLSCH_t
*
sib1
=
&
eNB
->
ndlsch_SIB1
;
int
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
int
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
int
subframe
=
proc
->
subframe_tx
;
int
subframe
=
proc
->
subframe_tx
;
int
frame
=
proc
->
frame_tx
;
int
frame
=
proc
->
frame_tx
;
...
@@ -226,7 +227,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -226,7 +227,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
int
RB_IoT_ID
=
2
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
RB_IoT_ID
=
2
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
With_NSSS
=
0
;
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
int
With_NSSS
=
0
;
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
uint8_t
*
npbch_pdu
=
get_NB_IoT_MIB
();
uint8_t
*
npbch_pdu
=
get_NB_IoT_MIB
();
uint8_t
*
sib1_pdu
=
get_NB_IoT_SIB1
();
//NSSS only happened in the even frame
//NSSS only happened in the even frame
if
(
frame
%
2
==
0
)
if
(
frame
%
2
==
0
)
{
{
...
@@ -279,6 +280,42 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -279,6 +280,42 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
RB_IoT_ID
);
RB_IoT_ID
);
}
}
// SIB1
/*
if(subframe == 4)
{
*/
/*
dlsch_encoding_NB_IoT(sib1_pdu,
sib1,
number_of_subframes_required, ***************
G); ***********
dlsch_sib1_scrambling_NB_IoT(fp,
sib1,
total_bits, **************************
frame,
subframe*2);
dlsch_modulation_NB_IoT(txdataF,
AMP,
fp,
control_region_size, ********* // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
sib1,
G, ********* // number of bits per subframe
npdsch_data_subframe, ******* // subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
RB_IoT_ID)
}
if(Number_of_sib1_subframe > 1)
*/
}
}
void
phy_procedures_eNB_uespec_RX_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
UL_IND_NB_IoT_t
*
UL_INFO
)
void
phy_procedures_eNB_uespec_RX_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
UL_IND_NB_IoT_t
*
UL_INFO
)
...
...
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