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
常顺宇
OpenXG-RAN
Commits
d22c0f72
Commit
d22c0f72
authored
Feb 06, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for ssb bitmap endian (to be checked with FSW)
parent
607f561e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
28 deletions
+53
-28
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+9
-2
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+10
-10
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-2
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+2
-1
openair2/GNB_APP/RRC_nr_paramsvalues.h
openair2/GNB_APP/RRC_nr_paramsvalues.h
+1
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+21
-4
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+5
-4
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+4
-4
No files found.
openair1/PHY/INIT/nr_init.c
View file @
d22c0f72
...
@@ -360,12 +360,16 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
...
@@ -360,12 +360,16 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
nfapi_nr_config_request_scf_t
*
gNB_config
=
&
gNB
->
gNB_config
;
nfapi_nr_config_request_scf_t
*
gNB_config
=
&
gNB
->
gNB_config
;
//overwrite for new NR parameters
//overwrite for new NR parameters
uint64_t
rev_burst
=
0
;
for
(
int
i
=
0
;
i
<
64
;
i
++
)
rev_burst
|=
(((
position_in_burst
>>
(
63
-
i
))
&
0x01
)
<<
i
);
gNB_config
->
cell_config
.
phy_cell_id
.
value
=
Nid_cell
;
gNB_config
->
cell_config
.
phy_cell_id
.
value
=
Nid_cell
;
gNB_config
->
ssb_config
.
scs_common
.
value
=
mu
;
gNB_config
->
ssb_config
.
scs_common
.
value
=
mu
;
gNB_config
->
ssb_table
.
ssb_subcarrier_offset
.
value
=
0
;
gNB_config
->
ssb_table
.
ssb_subcarrier_offset
.
value
=
0
;
gNB_config
->
ssb_table
.
ssb_offset_point_a
.
value
=
(
N_RB_DL
-
20
)
>>
1
;
gNB_config
->
ssb_table
.
ssb_offset_point_a
.
value
=
(
N_RB_DL
-
20
)
>>
1
;
gNB_config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
position_in_burst
;
gNB_config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
(
rev_burst
)
&
(
0xFFFFFFFF
)
;
gNB_config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
position_in_burst
>>
32
;
gNB_config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
(
rev_burst
>>
32
)
&
(
0xFFFFFFFF
)
;
gNB_config
->
cell_config
.
frame_duplex_type
.
value
=
TDD
;
gNB_config
->
cell_config
.
frame_duplex_type
.
value
=
TDD
;
gNB_config
->
ssb_table
.
ssb_period
.
value
=
1
;
//10ms
gNB_config
->
ssb_table
.
ssb_period
.
value
=
1
;
//10ms
gNB_config
->
carrier_config
.
dl_grid_size
[
mu
].
value
=
N_RB_DL
;
gNB_config
->
carrier_config
.
dl_grid_size
[
mu
].
value
=
N_RB_DL
;
...
@@ -381,6 +385,9 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
...
@@ -381,6 +385,9 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
fp
->
ul_CarrierFreq
=
3500000000
;
//fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
fp
->
ul_CarrierFreq
=
3500000000
;
//fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
fp
->
nr_band
=
78
;
fp
->
nr_band
=
78
;
fp
->
threequarter_fs
=
0
;
fp
->
threequarter_fs
=
0
;
gNB_config
->
carrier_config
.
dl_bandwidth
.
value
=
config_bandwidth
(
mu
,
N_RB_DL
,
fp
->
nr_band
);
nr_init_frame_parms
(
gNB_config
,
fp
);
nr_init_frame_parms
(
gNB_config
,
fp
);
gNB
->
configured
=
1
;
gNB
->
configured
=
1
;
LOG_I
(
PHY
,
"gNB configured
\n
"
);
LOG_I
(
PHY
,
"gNB configured
\n
"
);
...
...
openair1/PHY/INIT/nr_parms.c
View file @
d22c0f72
...
@@ -99,12 +99,12 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
...
@@ -99,12 +99,12 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
// selection of SS block pattern according to TS 38101-1 Table 5.4.3.3-1 for SCS 30kHz
// selection of SS block pattern according to TS 38101-1 Table 5.4.3.3-1 for SCS 30kHz
if
(
fp
->
nr_band
==
5
||
fp
->
nr_band
==
66
)
if
(
fp
->
nr_band
==
5
||
fp
->
nr_band
==
66
)
fp
->
ssb_type
=
nr_ssb_type_B
;
fp
->
ssb_type
=
nr_ssb_type_B
;
else
{
else
{
if
(
fp
->
nr_band
==
41
||
(
fp
->
nr_band
>
76
&&
fp
->
nr_band
<
80
)
)
if
(
fp
->
nr_band
==
41
||
(
fp
->
nr_band
>
76
&&
fp
->
nr_band
<
80
)
)
fp
->
ssb_type
=
nr_ssb_type_C
;
fp
->
ssb_type
=
nr_ssb_type_C
;
else
else
AssertFatal
(
1
==
0
,
"NR Operating Band n%d not available for SS block SCS with mu=%d
\n
"
,
fp
->
nr_band
,
mu
);
AssertFatal
(
1
==
0
,
"NR Operating Band n%d not available for SS block SCS with mu=%d
\n
"
,
fp
->
nr_band
,
mu
);
}
}
switch
(
bw
){
switch
(
bw
){
...
@@ -148,21 +148,21 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
...
@@ -148,21 +148,21 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
break
;
break
;
case
90
:
case
90
:
AssertFatal
(
fp
->
threequarter_fs
==
0
,
"3/4 sampling impossible for
N_RB %d and MU %d
\n
"
,
fp
->
N_RB_DL
,
mu
);
AssertFatal
(
fp
->
threequarter_fs
==
0
,
"3/4 sampling impossible for
%d MHz band and MU %d
\n
"
,
bw
,
mu
);
fp
->
ofdm_symbol_size
=
4096
;
fp
->
ofdm_symbol_size
=
4096
;
fp
->
first_carrier_offset
=
2626
;
//4096 - ( (245*12) / 2 )
fp
->
first_carrier_offset
=
2626
;
//4096 - ( (245*12) / 2 )
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples
=
288
;
fp
->
nb_prefix_samples
=
288
;
break
;
break
;
case
100
:
case
100
:
AssertFatal
(
fp
->
threequarter_fs
==
0
,
"3/4 sampling impossible for
N_RB %d and MU %d
\n
"
,
fp
->
N_RB_DL
,
mu
);
AssertFatal
(
fp
->
threequarter_fs
==
0
,
"3/4 sampling impossible for
%d MHz band and MU %d
\n
"
,
bw
,
mu
);
fp
->
ofdm_symbol_size
=
4096
;
fp
->
ofdm_symbol_size
=
4096
;
fp
->
first_carrier_offset
=
2458
;
//4096 - ( (273*12) / 2 )
fp
->
first_carrier_offset
=
2458
;
//4096 - ( (273*12) / 2 )
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples0
=
352
;
fp
->
nb_prefix_samples
=
288
;
fp
->
nb_prefix_samples
=
288
;
break
;
break
;
default:
default:
AssertFatal
(
1
==
0
,
"
Number of resource blocks %d undefined for mu %d, frame parms = %p
\n
"
,
fp
->
N_RB_DL
,
mu
,
fp
);
AssertFatal
(
1
==
0
,
"
%d MHz band undefined for mu %d, frame parms = %p
\n
"
,
bw
,
mu
,
fp
);
}
}
break
;
break
;
...
@@ -184,7 +184,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
...
@@ -184,7 +184,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
case
90
:
case
90
:
case
100
:
case
100
:
default:
default:
AssertFatal
(
1
==
0
,
"
Number of resource blocks %d undefined for mu %d, frame parms = %p
\n
"
,
fp
->
N_RB_DL
,
mu
,
fp
);
AssertFatal
(
1
==
0
,
"
%d MHz band undefined for mu %d, frame parms = %p
\n
"
,
bw
,
mu
,
fp
);
}
}
break
;
break
;
...
@@ -206,7 +206,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
...
@@ -206,7 +206,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
fp
->
nb_prefix_samples
=
36
;
fp
->
nb_prefix_samples
=
36
;
break
;
break
;
default:
default:
AssertFatal
(
1
==
0
,
"
Number of resource blocks %d undefined for mu %d, frame parms = %p
\n
"
,
fp
->
N_RB_DL
,
mu
,
fp
);
AssertFatal
(
1
==
0
,
"
%d MHz band undefined for mu %d, frame parms = %p
\n
"
,
bw
,
mu
,
fp
);
}
}
break
;
break
;
...
@@ -227,7 +227,7 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
...
@@ -227,7 +227,7 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
{
{
fp
->
frame_type
=
cfg
->
cell_config
.
frame_duplex_type
.
value
;
fp
->
frame_type
=
cfg
->
cell_config
.
frame_duplex_type
.
value
;
fp
->
L_ssb
=
(((
uint64_t
)
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
)
<<
32
)
|
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
;
fp
->
L_ssb
=
(((
uint64_t
)
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
)
<<
32
)
|
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
;
fp
->
N_RB_DL
=
cfg
->
carrier_config
.
dl_grid_size
[
cfg
->
ssb_config
.
scs_common
.
value
].
value
;
fp
->
N_RB_DL
=
cfg
->
carrier_config
.
dl_grid_size
[
cfg
->
ssb_config
.
scs_common
.
value
].
value
;
fp
->
N_RB_UL
=
cfg
->
carrier_config
.
ul_grid_size
[
cfg
->
ssb_config
.
scs_common
.
value
].
value
;
fp
->
N_RB_UL
=
cfg
->
carrier_config
.
ul_grid_size
[
cfg
->
ssb_config
.
scs_common
.
value
].
value
;
...
@@ -354,7 +354,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
...
@@ -354,7 +354,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp
->
Lmax
=
64
;
fp
->
Lmax
=
64
;
}
}
fp
->
L_ssb
=
(((
uint64_t
)
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
)
<<
32
)
|
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
;
fp
->
L_ssb
=
(((
uint64_t
)
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
)
<<
32
)
|
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
;
fp
->
N_ssb
=
0
;
fp
->
N_ssb
=
0
;
for
(
int
p
=
0
;
p
<
fp
->
Lmax
;
p
++
)
for
(
int
p
=
0
;
p
<
fp
->
Lmax
;
p
++
)
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
d22c0f72
...
@@ -95,8 +95,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
...
@@ -95,8 +95,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
ssb_index
=
i
+
SSB_Table
[
rel_slot
];
// computing the ssb_index
ssb_index
=
i
+
SSB_Table
[
rel_slot
];
// computing the ssb_index
if
((
ssb_index
<
64
)
&&
((
fp
->
L_ssb
>>
ssb_index
)
&
0x01
))
{
// generating the ssb only if the bit of L_ssb at current ssb index is 1
if
((
ssb_index
<
64
)
&&
((
fp
->
L_ssb
>>
(
63
-
ssb_index
))
&
0x01
))
{
// generating the ssb only if the bit of L_ssb at current ssb index is 1
fp
->
ssb_index
=
ssb_index
;
fp
->
ssb_index
=
ssb_index
;
int
ssb_start_symbol_abs
=
nr_get_ssb_start_symbol
(
fp
);
// computing the starting symbol for current ssb
int
ssb_start_symbol_abs
=
nr_get_ssb_start_symbol
(
fp
);
// computing the starting symbol for current ssb
ssb_start_symbol
=
ssb_start_symbol_abs
%
fp
->
symbols_per_slot
;
// start symbol wrt slot
ssb_start_symbol
=
ssb_start_symbol_abs
%
fp
->
symbols_per_slot
;
// start symbol wrt slot
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
d22c0f72
...
@@ -589,7 +589,8 @@ int main(int argc, char **argv)
...
@@ -589,7 +589,8 @@ int main(int argc, char **argv)
while
(
!
((
SSB_positions
>>
ssb_index
)
&
0x01
))
ssb_index
++
;
// to select the first transmitted ssb
while
(
!
((
SSB_positions
>>
ssb_index
)
&
0x01
))
ssb_index
++
;
// to select the first transmitted ssb
frame_parms
->
ssb_index
=
ssb_index
;
frame_parms
->
ssb_index
=
ssb_index
;
UE
->
symbol_offset
=
nr_get_ssb_start_symbol
(
frame_parms
);
UE
->
symbol_offset
=
nr_get_ssb_start_symbol
(
frame_parms
);
int
ssb_slot
=
(
ssb_index
/
2
)
+
(
n_hf
*
frame_parms
->
slots_per_frame
);
int
ssb_slot
=
(
ssb_index
>>
1
)
+
(
n_hf
*
frame_parms
->
slots_per_frame
);
for
(
int
i
=
UE
->
symbol_offset
+
1
;
i
<
UE
->
symbol_offset
+
4
;
i
++
)
{
for
(
int
i
=
UE
->
symbol_offset
+
1
;
i
<
UE
->
symbol_offset
+
4
;
i
++
)
{
nr_slot_fep
(
UE
,
nr_slot_fep
(
UE
,
i
%
frame_parms
->
symbols_per_slot
,
i
%
frame_parms
->
symbols_per_slot
,
...
...
openair2/GNB_APP/RRC_nr_paramsvalues.h
View file @
d22c0f72
...
@@ -301,7 +301,7 @@
...
@@ -301,7 +301,7 @@
{GNB_CONFIG_STRING_PRACHMSG1FDM,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM,defint64val:NR_RACH_ConfigGeneric__msg1_FDM_one,TYPE_INT64,0
/*72*/
},\
{GNB_CONFIG_STRING_PRACHMSG1FDM,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM,defint64val:NR_RACH_ConfigGeneric__msg1_FDM_one,TYPE_INT64,0
/*72*/
},\
{GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart,defint64val:0,TYPE_INT64,0
/*73*/
},\
{GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart,defint64val:0,TYPE_INT64,0
/*73*/
},\
{GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,defint64val:13,TYPE_INT64,0
/*74*/
},\
{GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,defint64val:13,TYPE_INT64,0
/*74*/
},\
{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,i
ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,defintval:-118,TYPE_INT32
,0
/*75*/
},\
{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,i
64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,defintval:-118,TYPE_INT64
,0
/*75*/
},\
{GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,defint64val:NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0
/*76*/
},\
{GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,defint64val:NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0
/*76*/
},\
{GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,defint64val:NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0
/*77*/
},\
{GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,defint64val:NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0
/*77*/
},\
{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,defint64val:NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0
/*78*/
},\
{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,defint64val:NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0
/*78*/
},\
...
...
openair2/GNB_APP/gnb_config.c
View file @
d22c0f72
...
@@ -212,23 +212,40 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
...
@@ -212,23 +212,40 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
void
fix_scc
(
NR_ServingCellConfigCommon_t
*
scc
,
uint64_t
ssbmap
)
{
void
fix_scc
(
NR_ServingCellConfigCommon_t
*
scc
,
uint64_t
ssbmap
)
{
int
ssbmaplen
=
(
int
)
scc
->
ssb_PositionsInBurst
->
present
;
int
ssbmaplen
=
(
int
)
scc
->
ssb_PositionsInBurst
->
present
;
uint8_t
curr_bit
;
AssertFatal
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap
||
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
||
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_longBitmap
,
"illegal ssbmaplen %d
\n
"
,
ssbmaplen
);
AssertFatal
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap
||
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
||
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_longBitmap
,
"illegal ssbmaplen %d
\n
"
,
ssbmaplen
);
// changing endianicity of ssbmap and filling the ssb_PositionsInBurst buffers
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap
){
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap
){
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
bits_unused
=
4
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
bits_unused
=
4
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
ssbmap
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
(
i
<
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
bits_unused
)
curr_bit
=
0
;
else
curr_bit
=
(
ssbmap
>>
(
7
-
i
))
&
0x01
;
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
|=
curr_bit
<<
i
;
}
}
else
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
){
}
else
if
(
ssbmaplen
==
NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap
){
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
size
=
1
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
=
CALLOC
(
1
,
1
);
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
ssbmap
;
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
|=
(((
ssbmap
>>
(
7
-
i
))
&
0x01
)
<<
i
);
}
else
{
}
else
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
=
CALLOC
(
1
,
8
);
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
=
CALLOC
(
1
,
8
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
for
(
int
j
=
0
;
j
<
8
;
j
++
)
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
=
(
ssbmap
>>
(
i
<<
3
))
&
(
0xff
);
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
=
0
;
curr_bit
=
(
ssbmap
>>
(
j
<<
3
))
&
(
0xff
);
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
j
]
|=
(((
curr_bit
>>
(
7
-
i
))
&
0x01
)
<<
i
);
}
}
}
// fix UL absolute frequency
// fix UL absolute frequency
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
d22c0f72
...
@@ -224,21 +224,22 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -224,21 +224,22 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
cfg
->
ssb_table
.
ssb_offset_point_a
=
absolute_diff
/
(
12
*
scs_scaling
)
-
10
;
cfg
->
ssb_table
.
ssb_offset_point_a
=
absolute_diff
/
(
12
*
scs_scaling
)
-
10
;
cfg
->
ssb_table
.
ssb_period
=
*
scc
->
ssb_periodicityServingCell
;
cfg
->
ssb_table
.
ssb_period
=
*
scc
->
ssb_periodicityServingCell
;
cfg
->
ssb_table
.
ssb_subcarrier_offset
=
0
;
// TODO currently not in RRC?
cfg
->
ssb_table
.
ssb_subcarrier_offset
=
0
;
// TODO currently not in RRC?
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
case
1
:
case
1
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
];
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
break
;
break
;
case
2
:
case
2
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
];
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
break
;
break
;
case
3
:
case
3
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
<<
i
*
8
);
}
}
break
;
break
;
default:
default:
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
d22c0f72
...
@@ -216,19 +216,19 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
...
@@ -216,19 +216,19 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
case
1
:
case
1
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
];
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
break
;
break
;
case
2
:
case
2
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
];
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
break
;
break
;
case
3
:
case
3
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
+
4
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
i
]
<<
i
*
8
);
}
}
break
;
break
;
default:
default:
...
...
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