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
wangjie
OpenXG-RAN
Commits
adaa8e13
Commit
adaa8e13
authored
Dec 14, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging of DCI indication and UE-FAPI interface
parent
597519f6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3259 additions
and
3246 deletions
+3259
-3246
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-2
cmake_targets/phy_simulators/CMakeLists.txt
cmake_targets/phy_simulators/CMakeLists.txt
+2
-2
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+3051
-3047
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+11
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+159
-158
openair2/RRC/LTE/MESSAGES/asn1_msg.c
openair2/RRC/LTE/MESSAGES/asn1_msg.c
+1
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+0
-1
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+33
-33
No files found.
cmake_targets/CMakeLists.txt
View file @
adaa8e13
...
...
@@ -2558,8 +2558,8 @@ target_link_libraries(ldpctest SIMU PHY PHY_NR m ${ATLAS_LIBRARIES})
add_executable
(
nr_pbchsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/pbchsim.c
${
T_SOURCE
}
)
target_link_libraries
(
nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
add_executable
(
nr_dlsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlsim.c
${
T_SOURCE
}
)
target_link_libraries
(
nr_dlsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR
CONFIG_LIB
-Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
add_executable
(
nr_dlsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/dlsim.c
${
T_SOURCE
}
)
target_link_libraries
(
nr_dlsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR
RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR
-Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
foreach
(
myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim
)
...
...
cmake_targets/phy_simulators/CMakeLists.txt
View file @
adaa8e13
...
...
@@ -3,11 +3,11 @@ set(PACKAGE_NAME "unitary_tests_simulators")
set
(
PHYSIM True
)
set
(
RF_BOARD None
)
set
(
XFORMS True
)
set
(
ENABLE_ITTI
Fals
e
)
set
(
ENABLE_ITTI
Tru
e
)
set
(
DEBUG_PHY False
)
set
(
MU_RECIEVER False
)
set
(
NAS_UE False
)
set
(
MESSAGE_CHART_GENERATOR False
)
set
(
RRC_ASN1_VERSION
"Rel1
4
"
)
set
(
RRC_ASN1_VERSION
"Rel1
5
"
)
set
(
T_TRACER True
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../CMakeLists.txt
)
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
adaa8e13
This source diff could not be displayed because it is too large. You can
view the blob
instead.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
adaa8e13
...
...
@@ -53,6 +53,7 @@
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
#include "NR_UE_PHY_INTERFACE/NR_IF_Module.h"
PHY_VARS_gNB
*
gNB
;
PHY_VARS_NR_UE
*
UE
;
RAN_CONTEXT_t
RC
;
...
...
@@ -105,6 +106,7 @@ void config_common(int Mod_idP,
uint32_t
dl_BandwidthP
);
// needed for some functions
PHY_VARS_NR_UE
***
PHY_vars_UE_g
;
uint16_t
conjugate
[
8
]
__attribute__
((
aligned
(
32
)))
=
{
-
1
,
1
,
-
1
,
1
,
-
1
,
1
,
-
1
,
1
};
...
...
@@ -475,7 +477,7 @@ int main(int argc, char **argv)
memcpy
(
&
UE
->
frame_parms
,
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
if
(
run_initial_sync
==
1
)
UE
->
is_synchronized
=
0
;
else
UE
->
is_synchronized
=
1
;
else
{
UE
->
is_synchronized
=
1
;
UE
->
UE_mode
[
0
]
=
PUSCH
;}
UE
->
perfect_ce
=
0
;
...
...
@@ -500,7 +502,7 @@ int main(int argc, char **argv)
UE
->
if_inst
=
nr_ue_if_module_init
(
0
);
UE
->
if_inst
->
scheduled_response
=
nr_ue_scheduled_response
;
UE
->
if_inst
->
phy_config_request
=
nr_ue_phy_config_request
;
UE
->
if_inst
->
dl_indication
=
dummy_
nr_ue_dl_indication
;
UE
->
if_inst
->
dl_indication
=
nr_ue_dl_indication
;
UE
->
if_inst
->
ul_indication
=
dummy_nr_ue_ul_indication
;
...
...
@@ -582,6 +584,13 @@ int main(int argc, char **argv)
//Configure UE
rrc_gNB_carrier_data_t
carrier
;
uint32_t
pdcch_ConfigSIB1
=
0
;
uint32_t
ssb_SubcarrierOffset
=
0
;
carrier
.
MIB
=
(
uint8_t
*
)
malloc
(
4
);
carrier
.
sizeof_MIB
=
do_MIB_NR
(
&
carrier
,
0
,
ssb_SubcarrierOffset
,
pdcch_ConfigSIB1
,
30
,
2
);
nr_rrc_mac_config_req_ue
(
0
,
0
,
0
,
carrier
.
mib
.
message
.
choice
.
mib
,
NULL
,
NULL
,
NULL
);
fapi_nr_dl_config_request_t
dl_config
;
// Type0 PDCCH search space
dl_config
.
number_pdus
=
1
;
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
adaa8e13
...
...
@@ -43,215 +43,216 @@ static nr_ue_if_module_t *nr_ue_if_module_inst[MAX_IF_MODULES];
// L2 Abstraction Layer
int
handle_bcch_bch
(
module_id_t
module_id
,
int
cc_id
,
unsigned
int
gNB_index
,
uint8_t
*
pduP
,
unsigned
int
additional_bits
,
uint32_t
ssb_index
,
uint32_t
ssb_length
,
uint16_t
cell_id
){
return
nr_ue_decode_mib
(
module_id
,
cc_id
,
gNB_index
,
additional_bits
,
ssb_length
,
// Lssb = 64 is not support
ssb_index
,
pduP
,
cell_id
);
return
nr_ue_decode_mib
(
module_id
,
cc_id
,
gNB_index
,
additional_bits
,
ssb_length
,
// Lssb = 64 is not support
ssb_index
,
pduP
,
cell_id
);
}
// L2 Abstraction Layer
int
handle_bcch_dlsch
(
module_id_t
module_id
,
int
cc_id
,
unsigned
int
gNB_index
,
uint32_t
sibs_mask
,
uint8_t
*
pduP
,
uint32_t
pdu_len
){
return
0
;
return
0
;
}
// L2 Abstraction Layer
int
handle_dci
(
module_id_t
module_id
,
int
cc_id
,
unsigned
int
gNB_index
,
fapi_nr_dci_pdu_rel15_t
*
dci
,
uint16_t
rnti
,
uint32_t
dci_type
){
return
nr_ue_process_dci
(
module_id
,
cc_id
,
gNB_index
,
dci
,
rnti
,
dci_type
);
printf
(
"handle_dci: rnti %x,dci_type %d
\n
"
,
rnti
,
dci_type
);
return
nr_ue_process_dci
(
module_id
,
cc_id
,
gNB_index
,
dci
,
rnti
,
dci_type
);
}
// L2 Abstraction Layer
int8_t
handle_dlsch
(
module_id_t
module_id
,
int
cc_id
,
uint8_t
gNB_index
,
fapi_nr_dci_indication_t
*
dci_ind
,
uint8_t
*
pduP
,
uint32_t
pdu_len
){
// return 0;
return
nr_ue_process_dlsch
(
module_id
,
cc_id
,
gNB_index
,
&
dci_ind
,
pduP
,
pdu_len
);
// return 0;
return
nr_ue_process_dlsch
(
module_id
,
cc_id
,
gNB_index
,
&
dci_ind
,
pduP
,
pdu_len
);
}
int
nr_ue_ul_indication
(
nr_uplink_indication_t
*
ul_info
){
NR_UE_L2_STATE_t
ret
;
module_id_t
module_id
=
ul_info
->
module_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
// clean previous FAPI messages
mac
->
tx_request
.
number_of_pdus
=
0
;
mac
->
ul_config_request
.
number_pdus
=
0
;
mac
->
dl_config_request
.
number_pdus
=
0
;
// clean previous FAPI messages
ret
=
nr_ue_scheduler
(
ul_info
->
module_id
,
ul_info
->
gNB_index
,
ul_info
->
cc_id
,
ul_info
->
frame
,
ul_info
->
slot
,
ul_info
->
ssb_index
,
0
,
0
);
// TODO check tx/rx frame/slot is need for NR version
switch
(
ret
){
case
CONNECTION_OK
:
break
;
case
CONNECTION_LOST
:
break
;
case
PHY_RESYNCH
:
break
;
case
PHY_HO_PRACH
:
break
;
default:
break
;
}
mac
->
if_module
->
scheduled_response
(
&
mac
->
scheduled_response
);
return
0
;
NR_UE_L2_STATE_t
ret
;
module_id_t
module_id
=
ul_info
->
module_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
// clean previous FAPI messages
mac
->
tx_request
.
number_of_pdus
=
0
;
mac
->
ul_config_request
.
number_pdus
=
0
;
mac
->
dl_config_request
.
number_pdus
=
0
;
// clean previous FAPI messages
ret
=
nr_ue_scheduler
(
ul_info
->
module_id
,
ul_info
->
gNB_index
,
ul_info
->
cc_id
,
ul_info
->
frame
,
ul_info
->
slot
,
ul_info
->
ssb_index
,
0
,
0
);
// TODO check tx/rx frame/slot is need for NR version
switch
(
ret
){
case
CONNECTION_OK
:
break
;
case
CONNECTION_LOST
:
break
;
case
PHY_RESYNCH
:
break
;
case
PHY_HO_PRACH
:
break
;
default:
break
;
}
mac
->
if_module
->
scheduled_response
(
&
mac
->
scheduled_response
);
return
0
;
}
int
nr_ue_dl_indication
(
nr_downlink_indication_t
*
dl_info
){
int32_t
i
;
uint32_t
ret_mask
=
0x0
;
module_id_t
module_id
=
dl_info
->
module_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
// clean up scheduled_response structure
if
(
dl_info
->
dci_ind
!=
NULL
){
printf
(
"[L2][IF MODULE][DL INDICATION][DCI_IND]
\n
"
);
for
(
i
=
0
;
i
<
dl_info
->
dci_ind
->
number_of_dcis
;
++
i
){
//
printf(">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis);
fapi_nr_dci_pdu_rel15_t
*
dci
=
&
dl_info
->
dci_ind
->
dci_list
[
i
].
dci
;
ret_mask
|=
(
handle_dci
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
dci
,
(
dl_info
->
dci_ind
->
dci_list
+
i
)
->
rnti
,
(
dl_info
->
dci_ind
->
dci_list
+
i
)
->
dci_format
))
<<
FAPI_NR_DCI_IND
;
/*switch((dl_info->dci_ind->dci_list+i)->dci_type){
case FAPI_NR_DCI_TYPE_0_0:
case FAPI_NR_DCI_TYPE_0_1:
case FAPI_NR_DCI_TYPE_1_1:
case FAPI_NR_DCI_TYPE_2_0:
case FAPI_NR_DCI_TYPE_2_1:
case FAPI_NR_DCI_TYPE_2_2:
case FAPI_NR_DCI_TYPE_2_3:
AssertFatal(1==0, "Not yet support at this moment!\n");
break;
int32_t
i
;
uint32_t
ret_mask
=
0x0
;
module_id_t
module_id
=
dl_info
->
module_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
// clean up scheduled_response structure
if
(
dl_info
->
dci_ind
!=
NULL
){
printf
(
"[L2][IF MODULE][DL INDICATION][DCI_IND]
\n
"
);
for
(
i
=
0
;
i
<
dl_info
->
dci_ind
->
number_of_dcis
;
++
i
){
printf
(
">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d
\n
"
,
i
,
dl_info
->
dci_ind
->
number_of_dcis
);
fapi_nr_dci_pdu_rel15_t
*
dci
=
&
dl_info
->
dci_ind
->
dci_list
[
i
].
dci
;
ret_mask
|=
(
handle_dci
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
dci
,
(
dl_info
->
dci_ind
->
dci_list
+
i
)
->
rnti
,
(
dl_info
->
dci_ind
->
dci_list
+
i
)
->
dci_format
))
<<
FAPI_NR_DCI_IND
;
/*switch((dl_info->dci_ind->dci_list+i)->dci_type){
case FAPI_NR_DCI_TYPE_0_0:
case FAPI_NR_DCI_TYPE_0_1:
case FAPI_NR_DCI_TYPE_1_1:
case FAPI_NR_DCI_TYPE_2_0:
case FAPI_NR_DCI_TYPE_2_1:
case FAPI_NR_DCI_TYPE_2_2:
case FAPI_NR_DCI_TYPE_2_3:
AssertFatal(1==0, "Not yet support at this moment!\n");
break;
case FAPI_NR_DCI_TYPE_1_0:
case FAPI_NR_DCI_TYPE_1_0:
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
// mapping into DL_CONFIG_REQ for DL-SCH
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15;
// mapping into DL_CONFIG_REQ for DL-SCH
fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15;
dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = 0x0000; // TX RNTI: UE-spec
memcpy(dlsch_config_pdu, dci, sizeof(fapi_nr_dci_pdu_rel15_t));
dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = 0x0000; // TX RNTI: UE-spec
memcpy(dlsch_config_pdu, dci, sizeof(fapi_nr_dci_pdu_rel15_t));
dl_config->number_pdus = dl_config->number_pdus + 1;
dl_config->number_pdus = dl_config->number_pdus + 1;
ret_mask |= (handle_dci(
dl_info->module_id,
dl_info->cc_id,
dl_info->gNB_index,
dci,
(dl_info->dci_ind->dci_list+i)->rnti,
(dl_info->dci_ind->dci_list+i)->dci_type)) << FAPI_NR_DCI_IND;
ret_mask |= (handle_dci(
dl_info->module_id,
dl_info->cc_id,
dl_info->gNB_index,
dci,
(dl_info->dci_ind->dci_list+i)->rnti,
(dl_info->dci_ind->dci_list+i)->dci_type)) << FAPI_NR_DCI_IND;
break;
break;
default:
break;
}*/
default:
break;
}*/
//(dl_info->dci_list+i)->rnti
//(dl_info->dci_list+i)->rnti
}
}
if
(
dl_info
->
rx_ind
!=
NULL
){
printf
(
"[L2][IF MODULE][DL INDICATION][RX_IND]
\n
"
);
for
(
i
=
0
;
i
<
dl_info
->
rx_ind
->
number_pdus
;
++
i
){
switch
(
dl_info
->
rx_ind
->
rx_indication_body
[
i
].
pdu_type
){
case
FAPI_NR_RX_PDU_TYPE_MIB
:
ret_mask
|=
(
handle_bcch_bch
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
additional_bits
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
ssb_index
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
ssb_length
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
cell_id
))
<<
FAPI_NR_RX_PDU_TYPE_MIB
;
break
;
case
FAPI_NR_RX_PDU_TYPE_SIB
:
ret_mask
|=
(
handle_bcch_dlsch
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
sib_pdu
.
sibs_mask
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
sib_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
sib_pdu
.
pdu_length
))
<<
FAPI_NR_RX_PDU_TYPE_SIB
;
break
;
case
FAPI_NR_RX_PDU_TYPE_DLSCH
:
// ret_mask |= (0) << FAPI_NR_RX_PDU_TYPE_DLSCH;
ret_mask
|=
(
handle_dlsch
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
&
dl_info
->
dci_ind
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu_length
))
<<
FAPI_NR_RX_PDU_TYPE_DLSCH
;
break
;
default:
break
;
}
}
}
if
(
dl_info
->
rx_ind
!=
NULL
){
printf
(
"[L2][IF MODULE][DL INDICATION][RX_IND]
\n
"
);
for
(
i
=
0
;
i
<
dl_info
->
rx_ind
->
number_pdus
;
++
i
){
switch
(
dl_info
->
rx_ind
->
rx_indication_body
[
i
].
pdu_type
){
case
FAPI_NR_RX_PDU_TYPE_MIB
:
ret_mask
|=
(
handle_bcch_bch
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
additional_bits
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
ssb_index
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
ssb_length
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
mib_pdu
.
cell_id
))
<<
FAPI_NR_RX_PDU_TYPE_MIB
;
break
;
case
FAPI_NR_RX_PDU_TYPE_SIB
:
ret_mask
|=
(
handle_bcch_dlsch
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
sib_pdu
.
sibs_mask
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
sib_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
sib_pdu
.
pdu_length
))
<<
FAPI_NR_RX_PDU_TYPE_SIB
;
break
;
case
FAPI_NR_RX_PDU_TYPE_DLSCH
:
// ret_mask |= (0) << FAPI_NR_RX_PDU_TYPE_DLSCH;
ret_mask
|=
(
handle_dlsch
(
dl_info
->
module_id
,
dl_info
->
cc_id
,
dl_info
->
gNB_index
,
&
dl_info
->
dci_ind
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu
,
(
dl_info
->
rx_ind
->
rx_indication_body
+
i
)
->
pdsch_pdu
.
pdu_length
))
<<
FAPI_NR_RX_PDU_TYPE_DLSCH
;
break
;
default:
break
;
}
}
}
AssertFatal
(
nr_ue_if_module_inst
[
module_id
]
!=
NULL
,
"IF module is void!
\n
"
);
nr_ue_if_module_inst
[
module_id
]
->
scheduled_response
(
&
mac
->
scheduled_response
);
AssertFatal
(
nr_ue_if_module_inst
[
module_id
]
!=
NULL
,
"IF module is void!
\n
"
);
nr_ue_if_module_inst
[
module_id
]
->
scheduled_response
(
&
mac
->
scheduled_response
);
return
0
;
return
0
;
}
nr_ue_if_module_t
*
nr_ue_if_module_init
(
uint32_t
module_id
){
if
(
nr_ue_if_module_inst
[
module_id
]
==
NULL
)
{
nr_ue_if_module_inst
[
module_id
]
=
(
nr_ue_if_module_t
*
)
malloc
(
sizeof
(
nr_ue_if_module_t
));
memset
((
void
*
)
nr_ue_if_module_inst
[
module_id
],
0
,
sizeof
(
nr_ue_if_module_t
));
nr_ue_if_module_inst
[
module_id
]
->
cc_mask
=
0
;
nr_ue_if_module_inst
[
module_id
]
->
current_frame
=
0
;
nr_ue_if_module_inst
[
module_id
]
->
current_slot
=
0
;
nr_ue_if_module_inst
[
module_id
]
->
phy_config_request
=
NULL
;
nr_ue_if_module_inst
[
module_id
]
->
scheduled_response
=
NULL
;
nr_ue_if_module_inst
[
module_id
]
->
dl_indication
=
nr_ue_dl_indication
;
nr_ue_if_module_inst
[
module_id
]
->
ul_indication
=
nr_ue_ul_indication
;
}
if
(
nr_ue_if_module_inst
[
module_id
]
==
NULL
)
{
nr_ue_if_module_inst
[
module_id
]
=
(
nr_ue_if_module_t
*
)
malloc
(
sizeof
(
nr_ue_if_module_t
));
memset
((
void
*
)
nr_ue_if_module_inst
[
module_id
],
0
,
sizeof
(
nr_ue_if_module_t
));
nr_ue_if_module_inst
[
module_id
]
->
cc_mask
=
0
;
nr_ue_if_module_inst
[
module_id
]
->
current_frame
=
0
;
nr_ue_if_module_inst
[
module_id
]
->
current_slot
=
0
;
nr_ue_if_module_inst
[
module_id
]
->
phy_config_request
=
NULL
;
nr_ue_if_module_inst
[
module_id
]
->
scheduled_response
=
NULL
;
nr_ue_if_module_inst
[
module_id
]
->
dl_indication
=
nr_ue_dl_indication
;
nr_ue_if_module_inst
[
module_id
]
->
ul_indication
=
nr_ue_ul_indication
;
}
return
nr_ue_if_module_inst
[
module_id
];
return
nr_ue_if_module_inst
[
module_id
];
}
int
nr_ue_if_module_kill
(
uint32_t
module_id
)
{
if
(
nr_ue_if_module_inst
[
module_id
]
!=
NULL
){
free
(
nr_ue_if_module_inst
[
module_id
]);
}
return
0
;
if
(
nr_ue_if_module_inst
[
module_id
]
!=
NULL
){
free
(
nr_ue_if_module_inst
[
module_id
]);
}
return
0
;
}
openair2/RRC/LTE/MESSAGES/asn1_msg.c
View file @
adaa8e13
...
...
@@ -39,7 +39,7 @@
#include <asn_application.h>
#include <asn_internal.h>
/* for _ASN_DEFAULT_STACK_MAX */
#include <per_encoder.h>
//#include "COMMON/messages_types.h"
#include "assertions.h"
#include "RRCConnectionRequest.h"
#include "UL-CCCH-Message.h"
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
adaa8e13
...
...
@@ -42,7 +42,6 @@
#include "asn1_msg.h"
#include "RRC/NR/nr_rrc_extern.h"
#if defined(NR_Rel15)
#include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h"
...
...
targets/RT/USER/nr-ue.c
View file @
adaa8e13
...
...
@@ -634,7 +634,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
proc
->
instance_cnt_rxtx
=-
1
;
proc
->
subframe_rx
=
proc
->
sub_frame_start
;
proc
->
dci_err_cnt
=
0
;
proc
->
dci_err_cnt
=
0
;
char
threadname
[
256
];
sprintf
(
threadname
,
"UE_%d_proc_%d"
,
UE
->
Mod_id
,
proc
->
sub_frame_start
);
cpu_set_t
cpuset
;
...
...
@@ -1114,42 +1114,42 @@ void *UE_thread(void *arg) {
// pickStaticTime(lastTime);
}
//UE->mode != loop_through_memory
else
{
proc
->
nr_tti_rx
=
subframe_nr
;
proc
->
subframe_rx
=
subframe_nr
;
if
(
subframe_nr
==
0
)
{
for
(
th_id
=
0
;
th_id
<
RX_NB_TH
;
th_id
++
)
{
UE
->
proc
.
proc_rxtx
[
th_id
].
frame_rx
++
;
}
proc
->
nr_tti_rx
=
subframe_nr
;
proc
->
subframe_rx
=
subframe_nr
;
if
(
subframe_nr
==
0
)
{
for
(
th_id
=
0
;
th_id
<
RX_NB_TH
;
th_id
++
)
{
UE
->
proc
.
proc_rxtx
[
th_id
].
frame_rx
++
;
}
proc
->
frame_tx
=
proc
->
frame_rx
;
proc
->
nr_tti_tx
=
subframe_nr
+
DURATION_RX_TO_TX
;
if
(
proc
->
nr_tti_tx
>
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
{
proc
->
frame_tx
=
(
proc
->
frame_tx
+
1
)
%
MAX_FRAME_NUMBER
;
proc
->
nr_tti_tx
%=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
}
proc
->
subframe_tx
=
proc
->
nr_tti_tx
;
printf
(
"Processing subframe %d
\n
"
,
proc
->
subframe_rx
);
if
(
UE
->
if_inst
!=
NULL
&&
UE
->
if_inst
->
ul_indication
!=
NULL
){
UE
->
ul_indication
.
module_id
=
0
;
UE
->
ul_indication
.
gNB_index
=
0
;
UE
->
ul_indication
.
cc_id
=
0
;
UE
->
ul_indication
.
slot
=
0
;
// to be fill
UE
->
ul_indication
.
frame
=
0
;
// to be fill
// [TODO] mapping right after NR initial sync
UE
->
ul_indication
.
frame
=
proc
->
frame_rx
;
UE
->
ul_indication
.
slot
=
proc
->
nr_tti_rx
;
UE
->
if_inst
->
ul_indication
(
&
UE
->
ul_indication
);
}
phy_procedures_nrUE_RX
(
UE
,
proc
,
0
,
1
,
UE
->
mode
);
getchar
();
}
proc
->
frame_tx
=
proc
->
frame_rx
;
proc
->
nr_tti_tx
=
subframe_nr
+
DURATION_RX_TO_TX
;
if
(
proc
->
nr_tti_tx
>
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
)
{
proc
->
frame_tx
=
(
proc
->
frame_tx
+
1
)
%
MAX_FRAME_NUMBER
;
proc
->
nr_tti_tx
%=
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
}
proc
->
subframe_tx
=
proc
->
nr_tti_tx
;
printf
(
"Processing subframe %d
\n
"
,
proc
->
subframe_rx
);
if
(
UE
->
if_inst
!=
NULL
&&
UE
->
if_inst
->
ul_indication
!=
NULL
){
UE
->
ul_indication
.
module_id
=
0
;
UE
->
ul_indication
.
gNB_index
=
0
;
UE
->
ul_indication
.
cc_id
=
0
;
UE
->
ul_indication
.
slot
=
0
;
// to be fill
UE
->
ul_indication
.
frame
=
0
;
// to be fill
// [TODO] mapping right after NR initial sync
UE
->
ul_indication
.
frame
=
proc
->
frame_rx
;
UE
->
ul_indication
.
slot
=
proc
->
nr_tti_rx
;
UE
->
if_inst
->
ul_indication
(
&
UE
->
ul_indication
);
}
phy_procedures_nrUE_RX
(
UE
,
proc
,
0
,
1
,
UE
->
mode
);
getchar
();
}
// else loop_through_memory
}
// start_rx_stream==1
}
// UE->is_synchronized==1
}
// while !oai_exit
return
NULL
;
}
...
...
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