Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
5b03e901
Commit
5b03e901
authored
Nov 27, 2019
by
Rakesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nr tdd config
parent
f9e93d59
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
28 deletions
+78
-28
executables/nr-ru.c
executables/nr-ru.c
+30
-10
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+20
-2
openair1/PHY/impl_defs_nr.h
openair1/PHY/impl_defs_nr.h
+1
-0
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+1
-1
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+15
-10
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+11
-5
No files found.
executables/nr-ru.c
View file @
5b03e901
...
...
@@ -722,23 +722,44 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
T_INT
(
0
),
T_BUFFER
(
&
ru
->
common
.
txdata
[
0
][
slot
*
fp
->
samples_per_slot
],
fp
->
samples_per_slot
*
4
));
int
slot_type
=
nr_slot_select
(
ru
->
nr_frame_parms
,
frame
,
slot
%
fp
->
slots_per_frame
);
int
prevslot_type
=
nr_slot_select
(
ru
->
nr_frame_parms
,
frame
,(
slot
+
(
fp
->
slots_per_frame
-
1
))
%
fp
->
slots_per_frame
);
int
sf_extension
=
0
;
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
if
((
slot
==
0
)
||
if
(
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_S_SLOT
)
{
int
siglen
=
fp
->
samples_per_tti
,
flags
=
1
;
if
(
slot_type
==
NR_S_SLOT
)
{
int
txsymb
=
fp
->
p_tdd_UL_DL_Configuration
->
nrofDownlinkSymbols
;
AssertFatal
(
txsymb
>
0
,
"illegal txsymb %d
\n
"
,
txsymb
);
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
txsymb
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
//+ ru->end_of_burst_delay;
flags
=
3
;
// end of burst
}
if
(
fp
->
frame_type
==
TDD
&&
slot_type
==
NR_DOWNLINK_SLOT
&&
prevslot_type
==
NR_UPLINK_SLOT
)
{
flags
=
2
;
// start of burst
//sf_extension = ru->sf_extension;
}
/*if ((slot == 0) ||
(slot == 1)) {
int siglen=fp->samples_per_slot;
int flags;
if (slot==0)
flags = 2;
else if (slot==1)
flags
=
3
;
flags=3;
*/
if
((
slot_type
&
NR_UPLINK_SLOT
)
==
0
)
{
//
if ((slot_type & NR_UPLINK_SLOT) == 0) {
/*
if (SF_type == SF_S) {
/*
if (SF_type == SF_S) {
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
flags=3; // end of burst
}
...
...
@@ -756,7 +777,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
(nextSF_type == SF_UL)) {
flags = 4; // start of burst and end of burst (only one DL SF between two UL)
sf_extension = ru->N_TA_offset<<1;
}
*/
}
*/
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU
,
frame
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU
,
slot
);
...
...
@@ -772,12 +793,11 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
siglen
+
sf_extension
,
ru
->
nb_tx
,
flags
);
LOG_D
(
PHY
,
"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, s
ubframe
%d
\n
"
,
ru
->
idx
,
LOG_D
(
PHY
,
"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, s
lot
%d
\n
"
,
ru
->
idx
,
(
long
long
unsigned
int
)
timestamp
,
frame
,
proc
->
frame_tx_unwrap
,
slot
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
0
);
AssertFatal
(
txs
==
siglen
+
sf_extension
,
"TX : Timeout (sent %u/%d)
\n
"
,
txs
,
siglen
);
}
}
}
...
...
openair1/PHY/INIT/nr_init.c
View file @
5b03e901
...
...
@@ -403,6 +403,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
void
nr_phy_config_request
(
NR_PHY_Config_t
*
phy_config
)
{
uint8_t
Mod_id
=
phy_config
->
Mod_id
;
int
return_tdd
;
NR_DL_FRAME_PARMS
*
fp
=
&
RC
.
gNB
[
Mod_id
]
->
frame_parms
;
nfapi_nr_config_request_t
*
gNB_config
=
&
RC
.
gNB
[
Mod_id
]
->
gNB_config
;
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
]
=
phy_config
->
cfg
->
nfapi_config
.
rf_bands
.
rf_band
[
0
];
//22
...
...
@@ -417,6 +418,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
gNB_config
->
sch_config
.
ssb_scg_position_in_burst
.
value
=
phy_config
->
cfg
->
sch_config
.
ssb_scg_position_in_burst
.
value
;
gNB_config
->
sch_config
.
ssb_periodicity
.
value
=
phy_config
->
cfg
->
sch_config
.
ssb_periodicity
.
value
;
if
(
phy_config
->
cfg
->
subframe_config
.
duplex_mode
.
value
==
0
)
{
gNB_config
->
subframe_config
.
duplex_mode
.
value
=
FDD
;
}
else
{
...
...
@@ -424,6 +426,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
}
memcpy
((
void
*
)
&
gNB_config
->
rach_config
,(
void
*
)
&
phy_config
->
cfg
->
rach_config
,
sizeof
(
phy_config
->
cfg
->
rach_config
));
memcpy
((
void
*
)
&
gNB_config
->
tdd_ul_dl_config
,(
void
*
)
&
phy_config
->
cfg
->
tdd_ul_dl_config
,
sizeof
(
phy_config
->
cfg
->
tdd_ul_dl_config
));
RC
.
gNB
[
Mod_id
]
->
mac_enabled
=
1
;
fp
->
dl_CarrierFreq
=
from_nrarfcn
(
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
],
gNB_config
->
nfapi_config
.
nrarfcn
.
value
);
...
...
@@ -441,9 +444,24 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
(
unsigned
long
long
)
fp
->
dl_CarrierFreq
,
(
unsigned
long
long
)
fp
->
ul_CarrierFreq
);
nr_init_frame_parms
(
gNB_config
,
fp
);
if
(
gNB_config
->
subframe_config
.
duplex_mode
.
value
==
TDD
){
return_tdd
=
set_tdd_config_nr
(
fp
,
gNB_config
->
tdd_ul_dl_config
.
dl_ul_periodicity
.
value
,
gNB_config
->
tdd_ul_dl_config
.
nrofDownlinkSlots
.
value
,
gNB_config
->
tdd_ul_dl_config
.
nrofDownlinkSymbols
.
value
,
gNB_config
->
tdd_ul_dl_config
.
nrofUplinkSlots
.
value
,
gNB_config
->
tdd_ul_dl_config
.
nrofUplinkSymbols
.
value
);
if
(
return_tdd
!=
0
){
LOG_E
(
PHY
,
"TDD configuration can not be done
\n
"
);
}
else
LOG_I
(
PHY
,
"TDD has been properly configurated
\n
"
);
}
if
(
RC
.
gNB
[
Mod_id
]
->
configured
==
1
)
{
LOG_E
(
PHY
,
"Already gNB already configured, do nothing
\n
"
);
return
;
...
...
openair1/PHY/impl_defs_nr.h
View file @
5b03e901
...
...
@@ -97,6 +97,7 @@ SystemInformationBlockType1_nr_t;
#define NR_DOWNLINK_SLOT (0x01)
#define NR_UPLINK_SLOT (0x02)
#define NR_S_SLOT (0x03)
#define FRAME_DURATION_MICRO_SEC (10000)
/* frame duration in microsecond */
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
5b03e901
...
...
@@ -272,7 +272,7 @@ void nr_fep0(RU_t *ru, int first_half) {
end_symbol
=
NR_SYMBOLS_PER_SLOT
;
}
LOG_
D
(
PHY
,
"In fep0 for slot = %d, first_half = %d, start_symbol = %d, end_symbol = %d
\n
"
,
proc
->
tti_rx
,
first_half
,
start_symbol
,
end_symbol
);
LOG_
I
(
PHY
,
"In fep0 for slot = %d, first_half = %d, start_symbol = %d, end_symbol = %d
\n
"
,
proc
->
tti_rx
,
first_half
,
start_symbol
,
end_symbol
);
// printf("fep0: slot %d\n",slot);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
proc
->
tti_rx
,
1
);
...
...
openair1/SCHED_NR/phy_frame_config_nr.c
View file @
5b03e901
...
...
@@ -32,6 +32,8 @@
#include "SCHED_NR_UE/defs.h"
#include "PHY/defs_nr_UE.h"
#include "SCHED_NR_UE/phy_frame_config_nr.h"
#include "PHY/defs_common.h"
#include "PHY/impl_defs_top.h"
/*******************************************************************
*
...
...
@@ -55,8 +57,7 @@ int set_tdd_config_nr(NR_DL_FRAME_PARMS *frame_parms, int dl_UL_TransmissionPeri
{
TDD_UL_DL_configCommon_t
*
p_tdd_ul_dl_configuration
;
int
slot_number
=
0
;
int
nb_slots_to_set
=
TDD_CONFIG_NB_FRAMES
*
(
frame_parms
->
ttis_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
int
nb_slots_to_set
=
TDD_CONFIG_NB_FRAMES
*
(
frame_parms
->
slots_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
);
/* allocate buffer for configuration structure */
p_tdd_ul_dl_configuration
=
calloc
(
1
,
sizeof
(
TDD_UL_DL_configCommon_t
));
...
...
@@ -86,26 +87,28 @@ int set_tdd_config_nr(NR_DL_FRAME_PARMS *frame_parms, int dl_UL_TransmissionPeri
AssertFatal
(
nrofDownlinkSymbols
+
nrofUplinkSymbols
<
14
,
"illegal symbol configuration DL %d, UL %d
\n
"
,
nrofDownlinkSymbols
,
nrofUplinkSymbols
);
while
(
slot_number
!=
nb_slots_to_set
)
{
for
(
int
number_of_slot
=
0
;
number_of_slot
<
nrofDownlinkSlots
;
number_of_slot
++
)
{
frame_parms
->
tdd_uplink_nr
[
slot_number
]
=
NR_TDD_DOWNLINK_SLOT
;
printf
(
"slot %d set as downlink
\n
"
,
slot_number
);
slot_number
++
;
}
if
(
p_tdd_ul_dl_configuration
->
nrofDownlinkSymbols
!=
0
)
{
LOG_E
(
PHY
,
"set_tdd_configuration_nr: downlink symbol for slot is not supported for tdd configuration
\n
"
);
return
(
-
1
);
if
(
p_tdd_ul_dl_configuration
->
nrofDownlinkSymbols
!=
0
||
p_tdd_ul_dl_configuration
->
nrofUplinkSymbols
!=
0
)
{
frame_parms
->
tdd_uplink_nr
[
slot_number
]
=
(
1
<<
nrofUplinkSymbols
)
-
1
;
printf
(
"slot %d set as SL
\n
"
,
slot_number
);
slot_number
++
;
}
for
(
int
number_of_slot
=
0
;
number_of_slot
<
nrofUplinkSlots
;
number_of_slot
++
)
{
frame_parms
->
tdd_uplink_nr
[
slot_number
]
=
NR_TDD_UPLINK_SLOT
;
printf
(
"slot %d set as uplink
\n
"
,
slot_number
);
slot_number
++
;
}
if
(
p_tdd_ul_dl_configuration
->
nrofUplinkSymbols
!=
0
)
{
/*
if (p_tdd_ul_dl_configuration->nrofUplinkSymbols != 0) {
LOG_E(PHY,"set_tdd_configuration_nr: uplink symbol for slot is not supported for tdd configuration \n");
return (-1);
}
}
*/
}
if
(
frame_parms
->
p_tdd_UL_DL_ConfigurationCommon2
!=
NULL
)
{
...
...
@@ -261,16 +264,18 @@ int nr_slot_select(NR_DL_FRAME_PARMS *frame_parms, int nr_frame, int nr_tti)
if
(
frame_parms
->
tdd_uplink_nr
[
nr_tti
]
==
NR_TDD_UPLINK_SLOT
)
{
return
(
NR_UPLINK_SLOT
);
}
else
{
else
if
(
frame_parms
->
tdd_uplink_nr
[
nr_tti
]
==
NR_TDD_DOWNLINK_SLOT
)
{
return
(
NR_DOWNLINK_SLOT
);
}
else
return
(
NR_S_SLOT
);
}
else
if
((
frame_parms
->
tdd_uplink_nr
[(
frame_parms
->
ttis_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
)
+
nr_tti
]
==
NR_TDD_UPLINK_SLOT
))
{
return
(
NR_UPLINK_SLOT
);
}
else
{
else
if
((
frame_parms
->
tdd_uplink_nr
[(
frame_parms
->
ttis_per_subframe
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
)
+
nr_tti
]
==
NR_TDD_DOWNLINK_SLOT
))
{
return
(
NR_DOWNLINK_SLOT
);
}
else
return
(
NR_S_SLOT
);
}
/*******************************************************************
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
5b03e901
...
...
@@ -87,6 +87,12 @@ void config_common(int Mod_idP,
cfg
->
subframe_config
.
duplex_mode
.
value
=
1
;
cfg
->
subframe_config
.
duplex_mode
.
tl
.
tag
=
NFAPI_SUBFRAME_CONFIG_DUPLEX_MODE_TAG
;
cfg
->
num_tlv
++
;
cfg
->
tdd_ul_dl_config
.
referenceSubcarrierSpacing
.
value
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
referenceSubcarrierSpacing
;
cfg
->
tdd_ul_dl_config
.
dl_ul_periodicity
.
value
=
5000
;
//scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity;// rakesh:need to configure properly
cfg
->
tdd_ul_dl_config
.
nrofDownlinkSlots
.
value
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSlots
;
cfg
->
tdd_ul_dl_config
.
nrofDownlinkSymbols
.
value
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSymbols
;
cfg
->
tdd_ul_dl_config
.
nrofUplinkSlots
.
value
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
cfg
->
tdd_ul_dl_config
.
nrofUplinkSymbols
.
value
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
;
/// In NR DL and UL will be different band
cfg
->
nfapi_config
.
rf_bands
.
number_rf_bands
=
1
;
...
...
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