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
spbro
OpenXG-RAN
Commits
828077c2
Commit
828077c2
authored
8 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixes for eNB on usrp, some minor fixes for eMTC
parent
faa111ec
Branches unavailable
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
2019.w51
2019.w44
2019.w41
2019.w36
2019.w30
2019.w28
2019.w27
2019.w25
2019.w23
2019.w21
2019.w17
2019.w15
2019.w13
2019.w11
2019.w10
2019.w09
2019.w08
2019.w07
2019.w06
2019.w04
2019.w03
2018.w51
2018.w48
2018.w47
2018.w46
2018.w44
2018.w41
2018.w40
2018.w39
2018.w36
2018.w33
2018.w31
2018.w29
2018.w25
2018.w19
2018.w15
2018.w12
2018.w11
2018.w10
2018.w09
2018.w08
2018.w07
2018.w06
2018.w05
2018.w04
2018.w03
2018.w02
2017.w48
2017.w46
2017.w43
2017.w42
v2.1.0
v2.0.0
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
setparam
osa-etsi-ws-ue
osa-etsi-ws-try2
osa-etsi-ws-try1
osa-etsi-ws-gNB
oai_nr_sync
nr-ip-over-lte
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
flexran-eol
develop-nr-pdcch
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
develop-nr-2019w28
develop-nr-2019w23
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
ARC_1.3
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
306 additions
and
273 deletions
+306
-273
openair1/PHY/CODING/lte_rate_matching.c
openair1/PHY/CODING/lte_rate_matching.c
+4
-1
openair1/PHY/CODING/lte_segmentation.c
openair1/PHY/CODING/lte_segmentation.c
+3
-0
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+4
-4
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+2
-1
openair2/LAYER2/MAC/eNB_scheduler_bch.c
openair2/LAYER2/MAC/eNB_scheduler_bch.c
+269
-263
openair2/RRC/LITE/L2_interface.c
openair2/RRC/LITE/L2_interface.c
+18
-0
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+5
-3
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+1
-1
No files found.
openair1/PHY/CODING/lte_rate_matching.c
View file @
828077c2
...
@@ -514,7 +514,8 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
...
@@ -514,7 +514,8 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
if
(
Ncb
>
(
3
*
(
RTC
<<
5
)))
if
(
Ncb
>
(
3
*
(
RTC
<<
5
)))
AssertFatal
(
1
==
0
,
"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)
\n
"
,
Ncb
,
RTC
,
Nir
/
C
,
Nsoft
,
3
*
(
RTC
<<
5
));
AssertFatal
(
1
==
0
,
"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)
\n
"
,
Ncb
,
RTC
,
Nir
/
C
,
Nsoft
,
3
*
(
RTC
<<
5
));
AssertFatal
(
Nl
>
0
,
"Nl is 0
\n
"
);
AssertFatal
(
Qm
>
0
,
"Qm is 0
\n
"
);
Gp
=
G
/
Nl
/
Qm
;
Gp
=
G
/
Nl
/
Qm
;
GpmodC
=
Gp
%
C
;
GpmodC
=
Gp
%
C
;
...
@@ -720,6 +721,8 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
...
@@ -720,6 +721,8 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
Ncb
=
3
*
(
RTC
<<
5
);
Ncb
=
3
*
(
RTC
<<
5
);
}
}
AssertFatal
(
Nl
>
0
,
"Nl is 0
\n
"
);
AssertFatal
(
Qm
>
0
,
"Qm is 0
\n
"
);
Gp
=
G
/
Nl
/
Qm
;
Gp
=
G
/
Nl
/
Qm
;
GpmodC
=
Gp
%
C
;
GpmodC
=
Gp
%
C
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/lte_segmentation.c
View file @
828077c2
...
@@ -123,6 +123,9 @@ int lte_segmentation(unsigned char *input_buffer,
...
@@ -123,6 +123,9 @@ int lte_segmentation(unsigned char *input_buffer,
}
}
AssertFatal
(
Bprime
<=
(
*
Cplus
)
*
(
*
Kplus
)
+
(
*
Cminus
)
*
(
*
Kminus
),
"Bprime %d < (*Cplus %d)*(*Kplus %d) + (*Cminus %d)*(*Kminus %d)
\n
"
,
Bprime
,
*
Cplus
,
*
Kplus
,
*
Cminus
,
*
Kminus
);
*
F
=
((
*
Cplus
)
*
(
*
Kplus
)
+
(
*
Cminus
)
*
(
*
Kminus
)
-
(
Bprime
));
*
F
=
((
*
Cplus
)
*
(
*
Kplus
)
+
(
*
Cminus
)
*
(
*
Kminus
)
-
(
Bprime
));
#ifdef DEBUG_SEGMENTATION
#ifdef DEBUG_SEGMENTATION
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
828077c2
...
@@ -1018,7 +1018,7 @@ handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
...
@@ -1018,7 +1018,7 @@ handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
else
dlsch1_harq
->
pdu
=
sdu
;
else
dlsch1_harq
->
pdu
=
sdu
;
#ifdef Rel14
#ifdef Rel14
if
((
rel13
->
pdsch_payload_type
==
0
)
&&
(
rel13
->
ue_type
>
0
))
{
// this is a BR/CE UE and SIB1
-BR
if
((
rel13
->
pdsch_payload_type
<
2
)
&&
(
rel13
->
ue_type
>
0
))
{
// this is a BR/CE UE and SIB1-BR/SI
-BR
// configure PDSCH
// configure PDSCH
switch
(
eNB
->
frame_parms
.
N_RB_DL
)
{
switch
(
eNB
->
frame_parms
.
N_RB_DL
)
{
case
6
:
case
6
:
...
@@ -1048,13 +1048,13 @@ handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
...
@@ -1048,13 +1048,13 @@ handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
dlsch0_harq
->
nb_rb
=
6
;
dlsch0_harq
->
nb_rb
=
6
;
dlsch0_harq
->
vrb_type
=
LOCALIZED
;
dlsch0_harq
->
vrb_type
=
LOCALIZED
;
dlsch0_harq
->
rvidx
=
0
;
dlsch0_harq
->
rvidx
=
rel8
->
redundancy_version
;
dlsch0_harq
->
Nl
=
0
;
dlsch0_harq
->
Nl
=
1
;
dlsch0_harq
->
mimo_mode
=
(
eNB
->
frame_parms
.
nb_antenna_ports_eNB
==
1
)
?
SISO
:
ALAMOUTI
;
dlsch0_harq
->
mimo_mode
=
(
eNB
->
frame_parms
.
nb_antenna_ports_eNB
==
1
)
?
SISO
:
ALAMOUTI
;
dlsch0_harq
->
dl_power_off
=
1
;
dlsch0_harq
->
dl_power_off
=
1
;
dlsch0_harq
->
round
=
0
;
dlsch0_harq
->
round
=
0
;
dlsch0_harq
->
status
=
ACTIVE
;
dlsch0_harq
->
status
=
ACTIVE
;
dlsch0_harq
->
TBS
=
rel8
->
length
;
dlsch0_harq
->
TBS
=
rel8
->
length
<<
3
;
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.c
View file @
828077c2
...
@@ -503,7 +503,8 @@ void RCconfig_RU() {
...
@@ -503,7 +503,8 @@ void RCconfig_RU() {
if
(
!
(
if
(
!
(
config_setting_lookup_int
(
setting_ru
,
CONFIG_STRING_RU_MAX_RS_EPRE
,
&
max_pdschReferenceSignalPower
)
config_setting_lookup_int
(
setting_ru
,
CONFIG_STRING_RU_MAX_RS_EPRE
,
&
max_pdschReferenceSignalPower
)
&&
config_setting_lookup_int
(
setting_ru
,
CONFIG_STRING_RU_MAX_RXGAIN
,
&
max_rxgain
)
)
)
)
{
)
{
AssertFatal
(
0
,
AssertFatal
(
0
,
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_bch.c
View file @
828077c2
...
@@ -99,7 +99,7 @@ schedule_SIB1_BR(
...
@@ -99,7 +99,7 @@ schedule_SIB1_BR(
int
*
Sj
;
int
*
Sj
;
int
n_NB
=
0
;
int
n_NB
=
0
;
int
TBS
;
int
TBS
;
int
k
,
rvidx
;
int
k
=
0
,
rvidx
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
...
@@ -143,6 +143,7 @@ schedule_SIB1_BR(
...
@@ -143,6 +143,7 @@ schedule_SIB1_BR(
switch
(
N_RB_DL
)
{
switch
(
N_RB_DL
)
{
case
6
:
case
6
:
case
15
:
case
15
:
default:
m
=
1
;
m
=
1
;
n_NB
=
0
;
n_NB
=
0
;
N_S_NB
=
0
;
N_S_NB
=
0
;
...
@@ -189,98 +190,97 @@ schedule_SIB1_BR(
...
@@ -189,98 +190,97 @@ schedule_SIB1_BR(
AssertFatal
(
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
<
19
,
"schedulingInfoSIB1_BR_r13 %d > 18
\n
"
,
AssertFatal
(
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
<
19
,
"schedulingInfoSIB1_BR_r13 %d > 18
\n
"
,
(
int
)
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
);
(
int
)
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
);
TBS
=
SIB1_BR_TBS_table
[(
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
-
1
)
/
3
]
>>
3
;
AssertFatal
(
bcch_sdu_length
>
0
,
"RRC returned 0 bytes for SIB1-BR
\n
"
);
AssertFatal
(
bcch_sdu_length
<=
TBS
,
"length returned by RRC is not compatible with the TBS %d from MIB
\n
"
,
TBS
);
if
(
bcch_sdu_length
>
0
)
{
LOG_D
(
MAC
,
"[eNB %d] Frame %d : BCCH_BR->DLSCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
CC_id
,
bcch_sdu_length
);
// allocate all 6 PRBs in narrowband for SIB1_BR
TBS
=
SIB1_BR_TBS_table
[(
cc
->
mib
->
message
.
schedulingInfoSIB1_BR_r13
-
1
)
/
3
]
>>
3
;
first_rb
=
n_NB
*
6
;
vrb_map
[
first_rb
]
=
1
;
vrb_map
[
first_rb
+
1
]
=
1
;
vrb_map
[
first_rb
+
2
]
=
1
;
vrb_map
[
first_rb
+
3
]
=
1
;
vrb_map
[
first_rb
+
4
]
=
1
;
vrb_map
[
first_rb
+
5
]
=
1
;
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
AssertFatal
(
bcch_sdu_length
<=
TBS
,
"length returned by RRC %d is not compatible with the TBS %d from MIB
\n
"
,
bcch_sdu_length
,
TBS
);
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
length
=
TBS
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
6
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
rvidx
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
// Rel13 fields
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
ue_type
=
1
;
// CEModeA UE
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
pdsch_payload_type
=
0
;
// SIB1-BR
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
0xFFFF
;
// absolute SF
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req
->
number_pdu
++
;
// Program TX Request
LOG_D
(
MAC
,
"[eNB %d] Frame %d : BCCH_BR->DLSCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
CC_id
,
bcch_sdu_length
);
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
bcch_sdu_length
;
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_BR_pdu
[
0
].
payload
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
// allocate all 6 PRBs in narrowband for SIB1_BR
if
(
opt_enabled
==
1
)
{
first_rb
=
n_NB
*
6
;
trace_pdu
(
1
,
vrb_map
[
first_rb
]
=
1
;
&
cc
->
BCCH_BR_pdu
[
0
].
payload
[
0
],
vrb_map
[
first_rb
+
1
]
=
1
;
bcch_sdu_length
,
vrb_map
[
first_rb
+
2
]
=
1
;
0xffff
,
vrb_map
[
first_rb
+
3
]
=
1
;
4
,
vrb_map
[
first_rb
+
4
]
=
1
;
0xffff
,
vrb_map
[
first_rb
+
5
]
=
1
;
eNB
->
frame
,
eNB
->
subframe
,
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
0
,
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
0
);
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
LOG_D
(
OPT
,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d
\n
"
,
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
module_idP
,
frameP
,
CC_id
,
0xffff
,
bcch_sdu_length
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
length
=
TBS
;
}
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
if
(
cc
->
tdd_Config
!=
NULL
)
{
//TDD
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes
\n
"
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
frameP
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
CC_id
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
6
);
bcch_sdu_length
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
}
else
{
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
rvidx
;
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes
\n
"
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
frameP
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
CC_id
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
bcch_sdu_length
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
}
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
// Rel13 fields
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
ue_type
=
1
;
// CEModeA UE
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
pdsch_payload_type
=
0
;
// SIB1-BR
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
0xFFFF
;
// absolute SF
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req
->
number_pdu
++
;
// Program TX Request
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
bcch_sdu_length
;
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_BR_pdu
[
0
].
payload
;
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
if
(
opt_enabled
==
1
)
{
trace_pdu
(
1
,
&
cc
->
BCCH_BR_pdu
[
0
].
payload
[
0
],
bcch_sdu_length
,
0xffff
,
4
,
0xffff
,
eNB
->
frame
,
eNB
->
subframe
,
0
,
0
);
LOG_D
(
OPT
,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d
\n
"
,
module_idP
,
frameP
,
CC_id
,
0xffff
,
bcch_sdu_length
);
}
if
(
cc
->
tdd_Config
!=
NULL
)
{
//TDD
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes
\n
"
,
frameP
,
CC_id
,
bcch_sdu_length
);
}
else
{
}
else
{
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (FDD) for CC_id %d SIB1-BR %d bytes
\n
"
,
//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
frameP
,
CC_id
,
bcch_sdu_length
);
}
}
}
}
return
;
return
;
}
}
...
@@ -374,11 +374,12 @@ schedule_SI_BR(
...
@@ -374,11 +374,12 @@ schedule_SI_BR(
module_idP
,
module_idP
,
0
);
// not used in this case
0
);
// not used in this case
AssertFatal
(
bcch_sdu_length
>
0
,
"RRC returned 0 bytes for SI-BR %d
\n
"
,
i
);
if
(
bcch_sdu_length
>
0
)
{
if
(
bcch_sdu_length
>
0
)
{
AssertFatal
(
bcch_sdu_length
<=
(
si_TBS_r13
>>
3
),
AssertFatal
(
bcch_sdu_length
<=
(
si_TBS_r13
>>
3
),
"RRC provided bcch with length %d > %d
\n
"
,
"RRC provided bcch with length %d > %d
(si_TBS_r13 %d)
\n
"
,
bcch_sdu_length
,(
int
)(
si_TBS_r13
>>
3
));
bcch_sdu_length
,(
int
)(
si_TBS_r13
>>
3
)
,(
int
)
schedulingInfoList_BR_r13
->
list
.
array
[
i
]
->
si_TBS_r13
);
LOG_D
(
MAC
,
"[eNB %d] Frame %d : BCCH_BR %d->DLSCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
i
,
CC_id
,
bcch_sdu_length
);
LOG_D
(
MAC
,
"[eNB %d] Frame %d : BCCH_BR %d->DLSCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
i
,
CC_id
,
bcch_sdu_length
);
// allocate all 6 PRBs in narrowband for SIB1_BR
// allocate all 6 PRBs in narrowband for SIB1_BR
...
@@ -552,190 +553,195 @@ schedule_SI(
...
@@ -552,190 +553,195 @@ schedule_SI(
nfapi_dl_config_request_body_t
*
dl_req
;
nfapi_dl_config_request_body_t
*
dl_req
;
start_meas
(
&
eNB
->
schedule_si
);
start_meas
(
&
eNB
->
schedule_si
);
// Only schedule LTE System Information in subframe 5
if
(
subframeP
==
5
)
{
// Only schedule System Information in subframe 5
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
if
(
subframeP
!=
5
)
return
;
cc
=
&
eNB
->
common_channels
[
CC_id
];
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
vrb_map
=
(
void
*
)
&
cc
->
vrb_map
;
N_RB_DL
=
to_prb
(
cc
->
mib
->
message
.
dl_Bandwidth
);
cc
=
&
eNB
->
common_channels
[
CC_id
];
dl_req
=
&
eNB
->
DL_req
[
CC_id
].
dl_config_request_body
;
vrb_map
=
(
void
*
)
&
cc
->
vrb_map
;
N_RB_DL
=
to_prb
(
cc
->
mib
->
message
.
dl_Bandwidth
);
dl_req
=
&
eNB
->
DL_req
[
CC_id
].
dl_config_request_body
;
bcch_sdu_length
=
mac_rrc_data_req
(
module_idP
,
CC_id
,
frameP
,
BCCH
,
1
,
&
cc
->
BCCH_pdu
.
payload
[
0
],
1
,
module_idP
,
0
);
// not used in this case
if
(
bcch_sdu_length
>
0
)
{
LOG_D
(
MAC
,
"[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
CC_id
,
bcch_sdu_length
);
// Allocate 4 PRBs in a random location
/*
while (1) {
first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
if ((vrb_map[first_rb] != 1) &&
(vrb_map[first_rb+1] != 1) &&
(vrb_map[first_rb+2] != 1) &&
(vrb_map[first_rb+3] != 1))
break;
}
*/
switch
(
N_RB_DL
)
{
case
6
:
first_rb
=
0
;
break
;
case
15
:
first_rb
=
6
;
break
;
case
25
:
first_rb
=
11
;
break
;
case
50
:
first_rb
=
23
;
break
;
case
100
:
first_rb
=
48
;
break
;
}
vrb_map
[
first_rb
]
=
1
;
vrb_map
[
first_rb
+
1
]
=
1
;
vrb_map
[
first_rb
+
2
]
=
1
;
vrb_map
[
first_rb
+
3
]
=
1
;
// Get MCS for length of SI, 3 PRBs
if
(
bcch_sdu_length
<=
7
)
{
mcs
=
0
;
}
else
if
(
bcch_sdu_length
<=
11
)
{
mcs
=
1
;
}
else
if
(
bcch_sdu_length
<=
18
)
{
mcs
=
2
;
}
else
if
(
bcch_sdu_length
<=
22
)
{
mcs
=
3
;
}
else
if
(
bcch_sdu_length
<=
26
)
{
mcs
=
4
;
}
else
if
(
bcch_sdu_length
<=
28
)
{
mcs
=
5
;
}
else
if
(
bcch_sdu_length
<=
32
)
{
mcs
=
6
;
}
else
if
(
bcch_sdu_length
<=
41
)
{
mcs
=
7
;
}
else
if
(
bcch_sdu_length
<=
49
)
{
mcs
=
8
;
}
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1A
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
4
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti_type
=
2
;
// S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
transmission_power
=
6000
;
// equal to RS power
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
0
;
bcch_sdu_length
=
mac_rrc_data_req
(
module_idP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tpc
=
1
;
// no TPC
CC_id
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
1
;
frameP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_1
=
mcs
;
BCCH
,
1
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
0
;
&
cc
->
BCCH_pdu
.
payload
[
0
],
1
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
module_idP
,
0
);
// not used in this case
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
1
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
SI_RNTI
))
{
LOG_D
(
MAC
,
"Frame %d: Subframe %d : Adding common DCI for S_RNTI
\n
"
,
if
(
bcch_sdu_length
>
0
)
{
frameP
,
subframeP
);
LOG_D
(
MAC
,
"[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
CC_id
,
bcch_sdu_length
);
dl_req
->
number_dci
++
;
dl_req
->
number_pdu
++
;
// Allocate 4 PRBs in a random location
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
/*
while (1) {
first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL-4));
if ((vrb_map[first_rb] != 1) &&
(vrb_map[first_rb+1] != 1) &&
(vrb_map[first_rb+2] != 1) &&
(vrb_map[first_rb+3] != 1))
break;
}
*/
switch
(
N_RB_DL
)
{
case
6
:
first_rb
=
0
;
break
;
case
15
:
first_rb
=
6
;
break
;
case
25
:
first_rb
=
11
;
break
;
case
50
:
first_rb
=
23
;
break
;
case
100
:
first_rb
=
48
;
break
;
}
vrb_map
[
first_rb
]
=
1
;
vrb_map
[
first_rb
+
1
]
=
1
;
vrb_map
[
first_rb
+
2
]
=
1
;
vrb_map
[
first_rb
+
3
]
=
1
;
// Get MCS for length of SI, 3 PRBs
if
(
bcch_sdu_length
<=
7
)
{
mcs
=
0
;
}
else
if
(
bcch_sdu_length
<=
11
)
{
mcs
=
1
;
}
else
if
(
bcch_sdu_length
<=
18
)
{
mcs
=
2
;
}
else
if
(
bcch_sdu_length
<=
22
)
{
mcs
=
3
;
}
else
if
(
bcch_sdu_length
<=
26
)
{
mcs
=
4
;
}
else
if
(
bcch_sdu_length
<=
28
)
{
mcs
=
5
;
}
else
if
(
bcch_sdu_length
<=
32
)
{
mcs
=
6
;
}
else
if
(
bcch_sdu_length
<=
41
)
{
mcs
=
7
;
}
else
if
(
bcch_sdu_length
<=
49
)
{
mcs
=
8
;
}
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_dl_config_dci_dl_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
dci_format
=
NFAPI_DL_DCI_FORMAT_1A
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
=
4
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
rnti_type
=
2
;
// S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
transmission_power
=
6000
;
// equal to RS power
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
harq_process
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
tpc
=
1
;
// no TPC
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
new_data_indicator_1
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
mcs_1
=
mcs
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
redundancy_version_1
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
if
(
!
CCE_allocation_infeasible
(
module_idP
,
CC_id
,
1
,
subframeP
,
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel8
.
aggregation_level
,
SI_RNTI
))
{
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
LOG_D
(
MAC
,
"Frame %d: Subframe %d : Adding common DCI for S_RNTI
\n
"
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
frameP
,
subframeP
);
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
dl_req
->
number_dci
++
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
dl_req
->
number_pdu
++
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_dl_config_request_pdu_t
));
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_req
->
number_pdu
++
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_dl_config_dlsch_pdu
));
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
=
eNB
->
pdu_index
[
CC_id
];
// Program TX Request
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
=
0xFFFF
;
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_allocation_type
=
2
;
// format 1A/1B/1D
TX_req
->
pdu_length
=
bcch_sdu_length
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
virtual_resource_block_assignment_flag
=
0
;
// localized
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
resource_block_coding
=
getRIV
(
N_RB_DL
,
first_rb
,
4
);
TX_req
->
num_segments
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
modulation
=
2
;
//QPSK
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
redundancy_version
=
0
;
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_pdu
.
payload
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
=
1
;
// first block
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_block_to_codeword_swap_flag
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_scheme
=
(
cc
->
p_eNB
==
1
)
?
0
:
1
;
}
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_layers
=
1
;
else
{
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
number_of_subbands
=
1
;
LOG_E
(
MAC
,
"[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI
\n
"
,
module_idP
,
CC_id
,
frameP
,
subframeP
);
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
}
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ue_category_capacity
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pa
=
4
;
// 0 dB
if
(
opt_enabled
==
1
)
{
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
delta_power_offset_index
=
0
;
trace_pdu
(
1
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
ngap
=
0
;
&
cc
->
BCCH_pdu
.
payload
[
0
],
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
nprb
=
get_subbandsize
(
cc
->
mib
->
message
.
dl_Bandwidth
);
// ignored
bcch_sdu_length
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transmission_mode
=
(
cc
->
p_eNB
==
1
)
?
1
:
2
;
0xffff
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
4
,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
0xffff
,
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
eNB
->
frame
,
dl_req
->
number_pdu
++
;
eNB
->
subframe
,
0
,
// Program TX Request
0
);
TX_req
=
&
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
LOG_D
(
OPT
,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d
\n
"
,
TX_req
->
pdu_length
=
bcch_sdu_length
;
module_idP
,
frameP
,
CC_id
,
0xffff
,
bcch_sdu_length
);
TX_req
->
pdu_index
=
eNB
->
pdu_index
[
CC_id
]
++
;
}
TX_req
->
num_segments
=
1
;
if
(
cc
->
tdd_Config
!=
NULL
)
{
//TDD
TX_req
->
segments
[
0
].
segment_length
=
bcch_sdu_length
;
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)
\n
"
,
TX_req
->
segments
[
0
].
segment_data
=
cc
->
BCCH_pdu
.
payload
;
frameP
,
eNB
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
CC_id
,
bcch_sdu_length
,
}
mcs
);
else
{
LOG_E
(
MAC
,
"[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI
\n
"
,
module_idP
,
CC_id
,
frameP
,
subframeP
);
}
if
(
opt_enabled
==
1
)
{
trace_pdu
(
1
,
&
cc
->
BCCH_pdu
.
payload
[
0
],
bcch_sdu_length
,
0xffff
,
4
,
0xffff
,
eNB
->
frame
,
eNB
->
subframe
,
0
,
0
);
LOG_D
(
OPT
,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d
\n
"
,
module_idP
,
frameP
,
CC_id
,
0xffff
,
bcch_sdu_length
);
}
if
(
cc
->
tdd_Config
!=
NULL
)
{
//TDD
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)
\n
"
,
frameP
,
CC_id
,
bcch_sdu_length
,
mcs
);
}
else
{
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)
\n
"
,
frameP
,
CC_id
,
bcch_sdu_length
,
mcs
);
}
eNB
->
eNB_stats
[
CC_id
].
total_num_bcch_pdu
+=
1
;
eNB
->
eNB_stats
[
CC_id
].
bcch_buffer
=
bcch_sdu_length
;
eNB
->
eNB_stats
[
CC_id
].
total_bcch_buffer
+=
bcch_sdu_length
;
eNB
->
eNB_stats
[
CC_id
].
bcch_mcs
=
mcs
;
}
else
{
}
else
{
LOG_D
(
MAC
,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (FDD) for CC_id %d SI %d bytes (mcs %d, rb 3)
\n
"
,
frameP
,
//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
CC_id
,
bcch_sdu_length
,
mcs
);
}
}
eNB
->
eNB_stats
[
CC_id
].
total_num_bcch_pdu
+=
1
;
eNB
->
eNB_stats
[
CC_id
].
bcch_buffer
=
bcch_sdu_length
;
eNB
->
eNB_stats
[
CC_id
].
total_bcch_buffer
+=
bcch_sdu_length
;
eNB
->
eNB_stats
[
CC_id
].
bcch_mcs
=
mcs
;
}
else
{
//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
}
}
}
}
#ifdef Rel14
schedule_SIB1_BR
(
module_idP
,
frameP
,
subframeP
);
schedule_SI_BR
(
module_idP
,
frameP
,
subframeP
);
#endif
// this might be misleading when bcch is inactive
// this might be misleading when bcch is inactive
stop_meas
(
&
eNB
->
schedule_si
);
stop_meas
(
&
eNB
->
schedule_si
);
return
;
return
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/L2_interface.c
View file @
828077c2
...
@@ -304,6 +304,24 @@ mac_rrc_data_req(
...
@@ -304,6 +304,24 @@ mac_rrc_data_req(
}
}
#endif //Rel10 || Rel14
#endif //Rel10 || Rel14
#ifdef Rel14
if
((
Srb_id
&
RAB_OFFSET
)
==
BCCH_SIB1_BR
){
memcpy
(
&
buffer_pP
[
0
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB1_BR
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1_BR
);
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB1_BR
);
}
if
((
Srb_id
&
RAB_OFFSET
)
==
BCCH_SI_BR
){
// First SI message with SIB2/3
memcpy
(
&
buffer_pP
[
0
],
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
SIB23_BR
,
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23_BR
);
return
(
RC
.
rrc
[
Mod_idP
]
->
carrier
[
CC_id
].
sizeof_SIB23_BR
);
}
#endif
}
else
{
//This is an UE
}
else
{
//This is an UE
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
828077c2
...
@@ -341,8 +341,8 @@ int trx_usrp_set_gains(openair0_device* device,
...
@@ -341,8 +341,8 @@ int trx_usrp_set_gains(openair0_device* device,
openair0_config_t
*
openair0_cfg
)
{
openair0_config_t
*
openair0_cfg
)
{
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
::
uhd
::
gain_range_t
gain_range_tx
=
s
->
usrp
->
get_tx_gain_range
(
0
);
s
->
usrp
->
set_tx_gain
(
openair0_cfg
[
0
].
tx_gain
[
0
]);
s
->
usrp
->
set_tx_gain
(
gain_range_tx
.
stop
()
-
openair0_cfg
[
0
].
tx_gain
[
0
]);
::
uhd
::
gain_range_t
gain_range
=
s
->
usrp
->
get_rx_gain_range
(
0
);
::
uhd
::
gain_range_t
gain_range
=
s
->
usrp
->
get_rx_gain_range
(
0
);
// limit to maximum gain
// limit to maximum gain
if
(
openair0_cfg
[
0
].
rx_gain
[
0
]
-
openair0_cfg
[
0
].
rx_gain_offset
[
0
]
>
gain_range
.
stop
())
{
if
(
openair0_cfg
[
0
].
rx_gain
[
0
]
-
openair0_cfg
[
0
].
rx_gain_offset
[
0
]
>
gain_range
.
stop
())
{
...
@@ -641,11 +641,13 @@ extern "C" {
...
@@ -641,11 +641,13 @@ extern "C" {
openair0_cfg
[
0
].
rx_gain
[
i
]
-
openair0_cfg
[
0
].
rx_gain_offset
[
i
],
gain_range
.
stop
());
openair0_cfg
[
0
].
rx_gain
[
i
]
-
openair0_cfg
[
0
].
rx_gain_offset
[
i
],
gain_range
.
stop
());
}
}
}
}
for
(
int
i
=
0
;
i
<
s
->
usrp
->
get_tx_num_channels
();
i
++
)
{
for
(
int
i
=
0
;
i
<
s
->
usrp
->
get_tx_num_channels
();
i
++
)
{
::
uhd
::
gain_range_t
gain_range_tx
=
s
->
usrp
->
get_tx_gain_range
(
i
);
if
(
i
<
openair0_cfg
[
0
].
tx_num_channels
)
{
if
(
i
<
openair0_cfg
[
0
].
tx_num_channels
)
{
s
->
usrp
->
set_tx_rate
(
openair0_cfg
[
0
].
sample_rate
,
i
);
s
->
usrp
->
set_tx_rate
(
openair0_cfg
[
0
].
sample_rate
,
i
);
s
->
usrp
->
set_tx_freq
(
openair0_cfg
[
0
].
tx_freq
[
i
],
i
);
s
->
usrp
->
set_tx_freq
(
openair0_cfg
[
0
].
tx_freq
[
i
],
i
);
s
->
usrp
->
set_tx_gain
(
openair0_cfg
[
0
].
tx_gain
[
i
],
i
);
s
->
usrp
->
set_tx_gain
(
gain_range_tx
.
stop
()
-
openair0_cfg
[
0
].
tx_gain
[
i
],
i
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ru.c
View file @
828077c2
...
@@ -1638,7 +1638,7 @@ void fill_rf_config(RU_t *ru,const char *rf_config_file) {
...
@@ -1638,7 +1638,7 @@ void fill_rf_config(RU_t *ru,const char *rf_config_file) {
cfg
->
rx_freq
[
i
]
=
(
double
)
fp
->
ul_CarrierFreq
;
cfg
->
rx_freq
[
i
]
=
(
double
)
fp
->
ul_CarrierFreq
;
cfg
->
tx_gain
[
i
]
=
(
double
)
fp
->
att_tx
;
cfg
->
tx_gain
[
i
]
=
(
double
)
fp
->
att_tx
;
cfg
->
rx_gain
[
i
]
=
(
double
)
fp
->
att_rx
;
cfg
->
rx_gain
[
i
]
=
ru
->
max_rxgain
-
(
double
)
fp
->
att_rx
;
cfg
->
configFilename
=
rf_config_file
;
cfg
->
configFilename
=
rf_config_file
;
printf
(
"channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f
\n
"
,
printf
(
"channel %d, Setting tx_gain offset %f, rx_gain offset %f, tx_freq %f, rx_freq %f
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
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