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
alex037yang
OpenXG-RAN
Commits
6982e6f4
Commit
6982e6f4
authored
Mar 26, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup and formatting
parent
2c6e49c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
37 deletions
+34
-37
executables/nr-ue.c
executables/nr-ue.c
+1
-1
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+8
-8
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+8
-10
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-1
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+7
-8
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+9
-9
No files found.
executables/nr-ue.c
View file @
6982e6f4
...
@@ -420,7 +420,7 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
...
@@ -420,7 +420,7 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
nr_ue_scheduled_response
(
&
scheduled_response
);
nr_ue_scheduled_response
(
&
scheduled_response
);
if
(
UE
->
mode
!=
loop_through_memory
)
{
if
(
UE
->
mode
!=
loop_through_memory
)
{
uint8_t
thread_id
=
PHY_vars_UE_g
[
UE
->
M
od_id
][
0
]
->
current_thread_id
[
proc
->
nr_tti_tx
];
uint8_t
thread_id
=
PHY_vars_UE_g
[
m
od_id
][
0
]
->
current_thread_id
[
proc
->
nr_tti_tx
];
phy_procedures_nrUE_TX
(
UE
,
proc
,
0
,
thread_id
);
phy_procedures_nrUE_TX
(
UE
,
proc
,
0
,
thread_id
);
}
}
}
}
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
6982e6f4
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
void
nr_adjust_synch_ue
(
NR_DL_FRAME_PARMS
*
frame_parms
,
void
nr_adjust_synch_ue
(
NR_DL_FRAME_PARMS
*
frame_parms
,
PHY_VARS_NR_UE
*
ue
,
PHY_VARS_NR_UE
*
ue
,
module_id_t
e
NB_id
,
module_id_t
g
NB_id
,
uint8_t
subframe
,
uint8_t
subframe
,
unsigned
char
clear
,
unsigned
char
clear
,
short
coef
)
short
coef
)
{
{
...
@@ -60,8 +60,8 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -60,8 +60,8 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
temp
=
0
;
temp
=
0
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
Re
=
((
int16_t
*
)
ue
->
pbch_vars
[
e
NB_id
]
->
dl_ch_estimates_time
[
aa
])[(
i
<<
1
)];
Re
=
((
int16_t
*
)
ue
->
pbch_vars
[
g
NB_id
]
->
dl_ch_estimates_time
[
aa
])[(
i
<<
1
)];
Im
=
((
int16_t
*
)
ue
->
pbch_vars
[
e
NB_id
]
->
dl_ch_estimates_time
[
aa
])[
1
+
(
i
<<
1
)];
Im
=
((
int16_t
*
)
ue
->
pbch_vars
[
g
NB_id
]
->
dl_ch_estimates_time
[
aa
])[
1
+
(
i
<<
1
)];
temp
+=
(
Re
*
Re
/
2
)
+
(
Im
*
Im
/
2
);
temp
+=
(
Re
*
Re
/
2
)
+
(
Im
*
Im
/
2
);
}
}
...
@@ -111,11 +111,11 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -111,11 +111,11 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
}
}
}
}
if
(
ue
->
rx_offset
<
0
)
if
(
ue
->
rx_offset
<
0
)
ue
->
rx_offset
+=
frame_parms
->
samples_per_frame
;
ue
->
rx_offset
+=
frame_parms
->
samples_per_frame
;
if
(
ue
->
rx_offset
>=
frame_parms
->
samples_per_frame
)
if
(
ue
->
rx_offset
>=
frame_parms
->
samples_per_frame
)
ue
->
rx_offset
-=
frame_parms
->
samples_per_frame
;
ue
->
rx_offset
-=
frame_parms
->
samples_per_frame
;
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
6982e6f4
...
@@ -200,26 +200,24 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
...
@@ -200,26 +200,24 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
// if (UL_tti_req!=NULL) memcpy(&gNB->UL_tti_req,UL_tti_req,sizeof(nfapi_nr_ul_tti_request_t));
// if (UL_tti_req!=NULL) memcpy(&gNB->UL_tti_req,UL_tti_req,sizeof(nfapi_nr_ul_tti_request_t));
for
(
int
i
=
0
;
i
<
number_ul_dci_pdu
;
i
++
)
{
for
(
int
i
=
0
;
i
<
number_ul_dci_pdu
;
i
++
)
{
handle_nfapi_nr_ul_dci_pdu
(
gNB
,
handle_nfapi_nr_ul_dci_pdu
(
gNB
,
frame
,
slot
,
&
UL_dci_req
->
ul_dci_pdu_list
[
i
]);
frame
,
slot
,
&
UL_dci_req
->
ul_dci_pdu_list
[
i
]);
}
}
for
(
int
i
=
0
;
i
<
number_ul_tti_pdu
;
i
++
)
{
for
(
int
i
=
0
;
i
<
number_ul_tti_pdu
;
i
++
)
{
switch
(
UL_tti_req
->
pdus_list
[
i
].
pdu_type
)
{
switch
(
UL_tti_req
->
pdus_list
[
i
].
pdu_type
)
{
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUSCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUSCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
nr_fill_ulsch
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
&
UL_tti_req
->
pdus_list
[
i
].
pusch_pdu
);
nr_fill_ulsch
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
&
UL_tti_req
->
pdus_list
[
i
].
pusch_pdu
);
break
;
break
;
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
//
handle_nfapi_nr_pucch_pdu(gNB,frame,slot,UL_tti_req->pdus_list[i].pucch_pdu);
//
handle_nfapi_nr_pucch_pdu(gNB,frame,slot,UL_tti_req->pdus_list[i].pucch_pdu);
break
;
break
;
case
NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
nfapi_nr_prach_pdu_t
*
prach_pdu
=
&
UL_tti_req
->
pdus_list
[
i
].
prach_pdu
;
nfapi_nr_prach_pdu_t
*
prach_pdu
=
&
UL_tti_req
->
pdus_list
[
i
].
prach_pdu
;
nr_fill_prach
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
prach_pdu
);
nr_fill_prach
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
prach_pdu
);
nr_fill_prach_ru
(
gNB
->
RU_list
[
0
],
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
prach_pdu
);
nr_fill_prach_ru
(
gNB
->
RU_list
[
0
],
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
prach_pdu
);
break
;
break
;
}
}
}
}
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
6982e6f4
...
@@ -4576,7 +4576,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
...
@@ -4576,7 +4576,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
if
(
ue
->
mac_enabled
==
1
)
if
(
ue
->
mac_enabled
==
1
)
nr_Msg1_transmitted
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
);
nr_Msg1_transmitted
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
);
LOG_I
(
PHY
,
"[UE %d][RAPROC] Frame %d, nr_tti_tx %d: Generat
ing PRACH
(gNB %d) preamble index %d for UL, TX power %d dBm (PL %d dB)
\n
"
,
LOG_I
(
PHY
,
"[UE %d][RAPROC] Frame %d, nr_tti_tx %d: Generat
ed PRACH Msg1
(gNB %d) preamble index %d for UL, TX power %d dBm (PL %d dB)
\n
"
,
ue
->
Mod_id
,
ue
->
Mod_id
,
frame_tx
,
frame_tx
,
nr_tti_tx
,
nr_tti_tx
,
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
6982e6f4
...
@@ -149,8 +149,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -149,8 +149,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
scc
;
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
scc
;
int
i
;
int
i
;
mac
->
phy_config
.
Mod_id
=
module_id
;
mac
->
phy_config
.
Mod_id
=
module_id
;
mac
->
phy_config
.
CC_id
=
cc_idP
;
mac
->
phy_config
.
CC_id
=
cc_idP
;
// carrier config
// carrier config
...
@@ -318,8 +318,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -318,8 +318,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
cfg
->
prach_config
.
num_prach_fd_occasions_list
[
i
].
k1
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
msg1_FrequencyStart
;
cfg
->
prach_config
.
num_prach_fd_occasions_list
[
i
].
k1
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
msg1_FrequencyStart
;
cfg
->
prach_config
.
num_prach_fd_occasions_list
[
i
].
prach_zero_corr_conf
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
zeroCorrelationZoneConfig
;
cfg
->
prach_config
.
num_prach_fd_occasions_list
[
i
].
prach_zero_corr_conf
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
zeroCorrelationZoneConfig
;
cfg
->
prach_config
.
num_prach_fd_occasions_list
[
i
].
num_root_sequences
=
compute_nr_root_seq
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
,
cfg
->
prach_config
.
num_prach_fd_occasions_list
[
i
].
num_root_sequences
=
compute_nr_root_seq
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
,
nb_preambles
,
frame_type
);
nb_preambles
,
frame_type
);
//cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ???
//cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ???
}
}
...
@@ -351,10 +350,10 @@ int nr_rrc_mac_config_req_ue(
...
@@ -351,10 +350,10 @@ int nr_rrc_mac_config_req_ue(
if
(
spCell_ConfigP
!=
NULL
){
if
(
spCell_ConfigP
!=
NULL
){
mac
->
servCellIndex
=
*
spCell_ConfigP
->
servCellIndex
;
mac
->
servCellIndex
=
*
spCell_ConfigP
->
servCellIndex
;
if
(
spCell_ConfigP
->
reconfigurationWithSync
)
{
if
(
spCell_ConfigP
->
reconfigurationWithSync
)
{
mac
->
scc
=
spCell_ConfigP
->
reconfigurationWithSync
->
spCellConfigCommon
;
mac
->
scc
=
spCell_ConfigP
->
reconfigurationWithSync
->
spCellConfigCommon
;
config_common_ue
(
mac
,
module_id
,
cc_idP
);
config_common_ue
(
mac
,
module_id
,
cc_idP
);
mac
->
crnti
=
spCell_ConfigP
->
reconfigurationWithSync
->
newUE_Identity
;
mac
->
crnti
=
spCell_ConfigP
->
reconfigurationWithSync
->
newUE_Identity
;
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
}
}
mac
->
scd
=
spCell_ConfigP
->
spCellConfigDedicated
;
mac
->
scd
=
spCell_ConfigP
->
spCellConfigDedicated
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
6982e6f4
...
@@ -414,15 +414,15 @@ void nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -414,15 +414,15 @@ void nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// initialisation by RRC
// initialisation by RRC
// CCCH PDU
// CCCH PDU
mac_sdus
=
&
payload
[
sizeof
(
NR_MAC_SUBHEADER_SHORT
)];
mac_sdus
=
&
payload
[
sizeof
(
NR_MAC_SUBHEADER_SHORT
)];
size_sdu
=
(
uint16_t
)
mac_rrc_data_req_ue
(
mod_id
,
//
size_sdu = (uint16_t) mac_rrc_data_req_ue(mod_id,
CC_id
,
//
CC_id,
frame
,
//
frame,
CCCH
,
//
CCCH,
1
,
//
1,
mac_sdus
,
//
mac_sdus,
gNB_id
,
//
gNB_id,
0
);
//
0);
LOG_D
(
MAC
,
"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes
\n
"
,
mod_id
,
frame
,
size_sdu
);
LOG_D
(
MAC
,
"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes
\n
"
,
mod_id
,
frame
,
size_sdu
);
}
else
{
}
else
{
// fill ulsch_buffer with random data
// fill ulsch_buffer with random data
for
(
int
i
=
0
;
i
<
TBS_bytes
;
i
++
){
for
(
int
i
=
0
;
i
<
TBS_bytes
;
i
++
){
...
...
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