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
Michael Black
OpenXG-RAN
Commits
4cf96402
Commit
4cf96402
authored
Jun 06, 2023
by
David Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Sidelink bandwidth and link types with enum.
parent
a3135235
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
97 additions
and
121 deletions
+97
-121
executables/nr-gnb.c
executables/nr-gnb.c
+1
-1
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-0
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+10
-4
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+7
-4
openair1/PHY/MODULATION/ofdm_mod.c
openair1/PHY/MODULATION/ofdm_mod.c
+7
-5
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-1
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+2
-0
openair1/PHY/impl_defs_nr.h
openair1/PHY/impl_defs_nr.h
+6
-4
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+57
-97
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-1
No files found.
executables/nr-gnb.c
View file @
4cf96402
...
...
@@ -237,7 +237,7 @@ void rx_func(void *param)
slot_rx
,
0
,
gNB
->
frame_parms
.
Ncp
==
EXTENDED
?
12
:
14
,
NR_LINK_TYPE_UL
);
link_type_ul
);
}
}
phy_procedures_gNB_uespec_RX
(
gNB
,
frame_rx
,
slot_rx
);
...
...
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
4cf96402
...
...
@@ -570,6 +570,7 @@ typedef struct
uint32_t
uplink_frequency
;
//Absolute frequency of UL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
uint16_t
ul_k0
[
5
];
//𝑘0 𝜇 for each of the numerologies [38.211, sec 5.3.1] Value: : 0 ->23699
uint16_t
ul_grid_size
[
5
];
//Grid size 𝑁𝑔𝑟𝑖𝑑 𝑠𝑖𝑧𝑒,𝜇 for each of the numerologies [38.211, sec 4.4.2]. Value: 0->275 0 = this numerology not used
uint16_t
sl_grid_size
[
5
];
uint16_t
num_rx_ant
;
//
uint8_t
frequency_shift_7p5khz
;
//Indicates presence of 7.5KHz frequency shift. Value: 0 = false 1 = true
...
...
openair1/PHY/INIT/nr_parms.c
View file @
4cf96402
...
...
@@ -46,8 +46,10 @@ void set_Lmax(NR_DL_FRAME_PARMS *fp) {
int
sl_NumSSB_WithinPeriod
=
1
;
//TODO: Needs to be updated from RRC parameters
int
sl_TimeOffsetSSB
=
1
;
//TODO: Needs to be updated from RRC parameters
int
sl_TimeInterval
=
1
;
//TODO: Needs to be updated from RRC parameters
if
((
sl_NumSSB_WithinPeriod
==
2
)
&&
((
sl_TimeOffsetSSB
%
fp
->
slots_per_frame
)
+
sl_TimeInterval
<
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
))
if
((
sl_NumSSB_WithinPeriod
==
4
)
&&
((
sl_TimeOffsetSSB
%
fp
->
slots_per_frame
)
+
3
*
sl_TimeInterval
<
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
))
fp
->
Lmax
=
2
;
else
if
((
sl_NumSSB_WithinPeriod
==
2
)
&&
((
sl_TimeOffsetSSB
%
fp
->
slots_per_frame
)
+
sl_TimeInterval
<
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
))
fp
->
Lmax
=
4
;
else
fp
->
Lmax
=
1
;
return
;
...
...
@@ -161,6 +163,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
while
(
fp
->
ofdm_symbol_size
<
N_RB_DL
*
12
)
fp
->
ofdm_symbol_size
<<=
1
;
//TODO: The following 'if' setting needs to be removed later;
if
(
get_softmodem_params
()
->
sl_mode
==
2
)
fp
->
first_carrier_offset
=
0
;
else
...
...
@@ -298,7 +301,8 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
LOG_D
(
PHY
,
"dl_CarrierFreq %lu
\n
"
,
fp
->
dl_CarrierFreq
);
if
(
get_softmodem_params
()
->
sl_mode
==
2
)
{
fp
->
sl_CarrierFreq
=
((
dl_bw_khz
>>
1
)
+
config
->
carrier_config
.
sl_frequency
)
*
1000
;
uint64_t
sl_bw_khz
=
(
12
*
config
->
carrier_config
.
sl_grid_size
[
config
->
ssb_config
.
scs_common
])
*
(
15
<<
config
->
ssb_config
.
scs_common
);
fp
->
sl_CarrierFreq
=
((
sl_bw_khz
>>
1
)
+
config
->
carrier_config
.
sl_frequency
)
*
1000
;
}
uint64_t
ul_bw_khz
=
(
12
*
config
->
carrier_config
.
ul_grid_size
[
config
->
ssb_config
.
scs_common
])
*
(
15
<<
config
->
ssb_config
.
scs_common
);
...
...
@@ -307,6 +311,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp
->
numerology_index
=
config
->
ssb_config
.
scs_common
;
fp
->
N_RB_UL
=
config
->
carrier_config
.
ul_grid_size
[
fp
->
numerology_index
];
fp
->
N_RB_DL
=
config
->
carrier_config
.
dl_grid_size
[
fp
->
numerology_index
];
fp
->
N_RB_SL
=
config
->
carrier_config
.
sl_grid_size
[
fp
->
numerology_index
];
fp
->
frame_type
=
get_frame_type
(
fp
->
nr_band
,
fp
->
numerology_index
);
int32_t
uplink_frequency_offset
=
get_delta_duplex
(
fp
->
nr_band
,
fp
->
numerology_index
);
...
...
@@ -325,8 +330,8 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
AssertFatal
(
fp
->
numerology_index
==
NR_MU_2
,
"Invalid cyclic prefix %d for numerology index %d
\n
"
,
Ncp
,
fp
->
numerology_index
);
fp
->
Ncp
=
Ncp
;
set_scs_parameters
(
fp
,
fp
->
numerology_index
,
fp
->
N_RB_DL
);
int
N_RB
=
(
get_softmodem_params
()
->
sl_mode
==
2
)
?
fp
->
N_RB_SL
:
fp
->
N_RB_DL
;
set_scs_parameters
(
fp
,
fp
->
numerology_index
,
N_RB
);
fp
->
slots_per_frame
=
10
*
fp
->
slots_per_subframe
;
fp
->
symbols_per_slot
=
((
Ncp
==
NORMAL
)
?
14
:
12
);
// to redefine for different slot formats
...
...
@@ -350,6 +355,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
}
fp
->
ssb_start_subcarrier
=
(
12
*
config
->
ssb_table
.
ssb_offset_point_a
+
sco
);
//TODO: The following setting needs to be removed later;
if
(
get_softmodem_params
()
->
sl_mode
==
2
)
{
fp
->
ssb_start_subcarrier
=
0
;
}
...
...
openair1/PHY/MODULATION/nr_modulation.c
View file @
4cf96402
...
...
@@ -21,6 +21,7 @@
#include "nr_modulation.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "executables/softmodem-common.h"
//Table 6.3.1.5-1 Precoding Matrix W 1 layer 2 antenna ports 'n' = -1 and 'o' = -j
const
char
nr_W_1l_2p
[
6
][
2
][
1
]
=
{
...
...
@@ -600,18 +601,20 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
uint64_t
dl_CarrierFreq
=
fp
->
dl_CarrierFreq
;
uint64_t
ul_CarrierFreq
=
fp
->
ul_CarrierFreq
;
uint64_t
sl_CarrierFreq
=
fp
->
sl_CarrierFreq
;
double
f
[
3
]
=
{(
double
)
dl_CarrierFreq
,
(
double
)
ul_CarrierFreq
,
(
double
)
s
l_CarrierFreq
};
double
f
[
2
]
=
{(
double
)
dl_CarrierFreq
,
(
double
)
u
l_CarrierFreq
};
const
int
nsymb
=
fp
->
symbols_per_slot
*
fp
->
slots_per_frame
/
10
;
const
double
Tc
=
(
1
/
480e3
/
4096
);
const
double
Nu
=
2048
*
64
*
(
1
/
(
float
)(
1
<<
fp
->
numerology_index
));
const
double
Ncp0
=
16
*
64
+
(
144
*
64
*
(
1
/
(
float
)(
1
<<
fp
->
numerology_index
)));
const
double
Ncp1
=
(
144
*
64
*
(
1
/
(
float
)(
1
<<
fp
->
numerology_index
)));
const
uint8_t
num_freq
=
sizeof
(
f
)
/
sizeof
(
f
[
0
]);
const
uint8_t
sl_freq
=
!
get_softmodem_params
()
->
sl_mode
?
0
:
1
;
for
(
uint8_t
ll
=
0
;
ll
<
sizeof
(
f
)
/
sizeof
(
f
[
0
])
;
ll
++
){
for
(
uint8_t
ll
=
0
;
ll
<
num_freq
+
sl_freq
;
ll
++
){
double
f0
=
f
[
ll
]
;
LOG_
D
(
PHY
,
"Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d
\n
"
,
f0
,
nsymb
);
double
f0
=
(
ll
<
num_freq
)
?
f
[
ll
]
:
(
double
)
sl_CarrierFreq
;
LOG_
I
(
PHY
,
"Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d
\n
"
,
f0
,
nsymb
);
c16_t
*
symbol_rotation
=
fp
->
symbol_rotation
[
ll
];
double
tl
=
0
.
0
;
...
...
openair1/PHY/MODULATION/ofdm_mod.c
View file @
4cf96402
...
...
@@ -33,6 +33,7 @@ This section deals with basic functions for OFDM Modulation.
#include "PHY/defs_eNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_nr.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "modulation_common.h"
...
...
@@ -343,6 +344,7 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
int
symb_offset
=
(
slot
%
fp
->
slots_per_subframe
)
*
fp
->
symbols_per_slot
;
c16_t
*
symbol_rotation
=
fp
->
symbol_rotation
[
link_type
]
+
symb_offset
;
int
N_RB
=
(
link_type
==
link_type_sl
)
?
fp
->
N_RB_SL
:
fp
->
N_RB_DL
;
for
(
int
sidx
=
first_symbol
;
sidx
<
first_symbol
+
nsymb
;
sidx
++
)
{
c16_t
*
this_rotation
=
symbol_rotation
+
sidx
;
...
...
@@ -355,20 +357,20 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
this_rotation
->
r
,
this_rotation
->
i
);
if
(
fp
->
N_RB_DL
&
1
)
{
if
(
N_RB
&
1
)
{
rotate_cpx_vector
(
this_symbol
,
this_rotation
,
this_symbol
,
(
fp
->
N_RB_DL
+
1
)
*
6
,
15
);
(
N_RB
+
1
)
*
6
,
15
);
rotate_cpx_vector
(
this_symbol
+
fp
->
first_carrier_offset
-
6
,
this_rotation
,
this_symbol
+
fp
->
first_carrier_offset
-
6
,
(
fp
->
N_RB_DL
+
1
)
*
6
,
15
);
(
N_RB
+
1
)
*
6
,
15
);
}
else
{
rotate_cpx_vector
(
this_symbol
,
this_rotation
,
this_symbol
,
fp
->
N_RB_DL
*
6
,
15
);
N_RB
*
6
,
15
);
rotate_cpx_vector
(
this_symbol
+
fp
->
first_carrier_offset
,
this_rotation
,
this_symbol
+
fp
->
first_carrier_offset
,
fp
->
N_RB_DL
*
6
,
15
);
N_RB
*
6
,
15
);
}
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
4cf96402
...
...
@@ -301,7 +301,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
is
*
fp
->
samples_per_frame
+
ue
->
ssb_offset
,
false
,
rxdataF
,
NR_LINK_TYPE_DL
);
link_type_dl
);
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"Calling sss detection (normal CP)
\n
"
);
...
...
@@ -536,7 +536,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
is
*
fp
->
samples_per_frame
+
phy_pdcch_config
->
sfn
*
fp
->
samples_per_frame
+
ue
->
rx_offset
,
true
,
rxdataF
,
NR_LINK_TYPE_DL
);
link_type_dl
);
nr_pdcch_channel_estimation
(
ue
,
proc
,
...
...
@@ -563,7 +563,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
is
*
fp
->
samples_per_frame
+
phy_pdcch_config
->
sfn
*
fp
->
samples_per_frame
+
ue
->
rx_offset
,
true
,
rxdataF
,
NR_LINK_TYPE_DL
);
link_type_dl
);
}
uint8_t
nb_re_dmrs
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
4cf96402
...
...
@@ -617,7 +617,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
for
(
ap
=
0
;
ap
<
n_antenna_ports
;
ap
++
)
{
for
(
int
s
=
0
;
s
<
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
s
++
){
c16_t
*
this_symbol
=
&
txdataF
[
ap
][
frame_parms
->
ofdm_symbol_size
*
s
];
c16_t
rot
=
frame_parms
->
symbol_rotation
[
NR_LINK_TYPE_UL
][
s
+
symb_offset
];
c16_t
rot
=
frame_parms
->
symbol_rotation
[
link_type_ul
][
s
+
symb_offset
];
LOG_D
(
PHY
,
"rotating txdataF symbol %d (%d) => (%d.%d)
\n
"
,
s
,
s
+
symb_offset
,
...
...
openair1/PHY/defs_nr_common.h
View file @
4cf96402
...
...
@@ -147,6 +147,8 @@ struct NR_DL_FRAME_PARMS {
int
N_RB_DL
;
/// Number of resource blocks (RB) in UL
int
N_RB_UL
;
/// Number of resource blocks (RB) in SL
int
N_RB_SL
;
/// total Number of Resource Block Groups: this is ceil(N_PRB/P)
uint8_t
N_RBG
;
/// Total Number of Resource Block Groups SubSets: this is P
...
...
openair1/PHY/impl_defs_nr.h
View file @
4cf96402
...
...
@@ -99,12 +99,14 @@ SystemInformationBlockType1_nr_t;
#define NR_UPLINK_SLOT (0x02)
#define NR_MIXED_SLOT (0x03)
#define NR_LINK_TYPE_DL (0x00)
#define NR_LINK_TYPE_UL (0x01)
#define NR_LINK_TYPE_SL (0x02)
#define FRAME_DURATION_MICRO_SEC (10000)
/* frame duration in microsecond */
enum
nr_Link
{
link_type_dl
,
link_type_ul
,
link_type_sl
,
};
typedef
enum
{
ms0p5
=
500
,
/* duration is given in microsecond */
ms0p625
=
625
,
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
4cf96402
...
...
@@ -222,7 +222,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
//apply the OFDM symbol rotation here
for
(
aa
=
0
;
aa
<
cfg
->
carrier_config
.
num_tx_ant
.
value
;
aa
++
)
{
apply_nr_rotation
(
fp
,
&
gNB
->
common_vars
.
txdataF
[
aa
][
txdataF_offset
],
slot
,
0
,
fp
->
Ncp
==
EXTENDED
?
12
:
14
,
NR_LINK_TYPE_DL
);
apply_nr_rotation
(
fp
,
&
gNB
->
common_vars
.
txdataF
[
aa
][
txdataF_offset
],
slot
,
0
,
fp
->
Ncp
==
EXTENDED
?
12
:
14
,
link_type_dl
);
T
(
T_GNB_PHY_DL_OUTPUT_SIGNAL
,
T_INT
(
0
),
T_INT
(
frame
),
T_INT
(
slot
),
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
4cf96402
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
4cf96402
...
...
@@ -1277,7 +1277,7 @@ int main(int argc, char **argv)
slot
,
0
,
gNB
->
frame_parms
.
Ncp
==
EXTENDED
?
12
:
14
,
NR_LINK_TYPE_UL
);
link_type_ul
);
}
ul_proc_error
=
phy_procedures_gNB_uespec_RX
(
gNB
,
frame
,
slot
);
...
...
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