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
315288de
Commit
315288de
authored
Jun 30, 2020
by
MaheshK1995
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hard-coded SLOT_CONFIG reception at PNF
parent
f17fc6da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
42 deletions
+132
-42
.vscode/launch.json
.vscode/launch.json
+39
-5
nfapi/CHANGES.md
nfapi/CHANGES.md
+38
-0
nfapi/README.md
nfapi/README.md
+18
-35
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
+2
-1
nfapi/open-nFAPI/pnf/src/pnf.c
nfapi/open-nFAPI/pnf/src/pnf.c
+26
-0
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+9
-1
No files found.
.vscode/launch.json
View file @
315288de
...
@@ -64,15 +64,49 @@
...
@@ -64,15 +64,49 @@
}
}
]
]
}
}
{
"name"
:
"(rfsim) PNF"
,
"type"
:
"cppdbg"
,
"request"
:
"launch"
,
"program"
:
" /home/glab/NR_nfapi/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem"
,
"args"
:
[
"RFSIMULATOR=server"
,
"-O"
,
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf"
,
"--pnf"
,
"--parallel-config"
,
"PARALLEL_SINGLE_THREAD"
,
"--rfsim"
],
"stopAtEntry"
:
false
,
"cwd"
:
"${workspaceFolder}"
,
"environment"
:
[],
"externalConsole"
:
false
,
"MIMode"
:
"gdb"
,
"miDebuggerPath"
:
"/usr/bin/gdb"
,
"setupCommands"
:
[
{
"description"
:
"Enable pretty-printing for gdb"
,
"text"
:
"-enable-pretty-printing"
,
"ignoreFailures"
:
true
}
]
}
{
{
"name"
:
"(gdb) Launch GNB"
,
"name"
:
"(gdb) Launch GNB"
,
"type"
:
"cppdbg"
,
"type"
:
"cppdbg"
,
"request"
:
"launch"
,
"request"
:
"launch"
,
"program"
:
"/home/glab/NR_nfapi/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem"
,
"program"
:
" /home/glab/NR_nfapi/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem"
,
"args"
:
[
"-E"
,
"-O "
,
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf"
,
"--parallel-config"
,
"PARALLEL_SINGLE_THREAD"
,
//
"/home/glab/NR_nfapi/openairinterface5g/cmake_targets/ran_build/build/nr-softmodem"
,
"--rfsim"
,
"--phy-test"
],
//
"args"
:
[,
//
"-O "
,
//
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf"
,
//
"--parallel-config"
,
//
"PARALLEL_SINGLE_THREAD"
,
//
"--rfsim"
,
//
"--phy-test"
],
"args"
:[
"-O"
,
"/home/glab/NR_nfapi/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf"
],
"stopAtEntry"
:
false
,
"stopAtEntry"
:
false
,
"cwd"
:
"${workspaceFolder}"
,
"cwd"
:
"${workspaceFolder}"
,
"environment"
:
[],
"environment"
:
[],
...
...
nfapi/CHANGES.md
0 → 100644
View file @
315288de
# Changelog
### 14/06/20
*
we are not clear on how the parameters are extracted from the config file
*
in ssc struct
*
for some values it is okay and for others it is zero (in
`config_request`
)
*
This causes Assertion Failures leading to termination on PNF side.
### 15/06/20
*
The values to config request are assigned in:
`config_common()`
in
`config.c`
*
need to add lines for
`cfg->nfapi_config`
*
the config request unpacked on pnf side still has some zero values, which causes assertional failure in from_nrarfcn()
### 16/06/20
*
Config request is recived and unpacked correctly
*
Regarding config response
*
we are confused about its' struct definition
*
it says list of TLVs in its entirety
*
and we need to dyanmically insert the invalid TLVs after checking in a categorical fashion
*
Need to think of a data structure to enable this feature.
```
struct{
list of uint8_t tlvs
list of uint16_t tlvs
list of uint32_t tlvs
}list of tlvs
```
*
Need the
`N_RB`
value to be non-zero and obtained from the config file. (carrier config grid size)
`int N_RB = gNB_config->carrier_config.dl_grid_size[gNB_config->ssb_config.scs_common.value].value;`
*
how is this
`gNB_config`
assigned its values?
### 19/06/20
*
`ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);`
sloc: 1428 in
`nr-ru.c`
*
the
`ru->rfdevice`
has all members zero or null.
*
This issue was solved by adding
`sdr_addrs`
to config file of PNF.
*
`if (cfg->tdd_table.max_tdd_periodicity_list[nr_tti].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==1`
*
throws segmentation error
*
`max_tdd_periodicity_list`
is not assigned memory
nfapi/README.md
View file @
315288de
# Changelog
## Running using USRP
### PNF
```
sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf --pnf
```
### 14/06/20
### VNF
*
we are not clear on how the parameters are extracted from the config file
```
*
in ssc struct
sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf --vnf
*
for some values it is okay and for others it is zero (in
`config_request`
)
```
*
This causes Assertion Failures leading to termination on PNF side.
### 15/06/20
*
The values to config request are assigned in:
`config_common()`
in
`config.c`
*
need to add lines for
`cfg->nfapi_config`
*
the config request unpacked on pnf side still has some zero values, which causes assertional failure in from_nrarfcn()
### 16/06/20
## Running using RF-Simulator
*
Config request is recived and unpacked correctly
### PNF
*
Regarding config response
```
*
we are confused about its' struct definition
sudo RFSIMULATOR=server <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>/targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf --pnf --parallel-config PARALLEL_SINGLE_THREAD --rfsim
*
it says list of TLVs in its entirety
```
*
and we need to dyanmically insert the invalid TLVs after checking in a categorical fashion
### VNF
*
Need to think of a data structure to enable this feature.
```
```
struct{
sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf --vnf
list of uint8_t tlvs
```
list of uint16_t tlvs
\ No newline at end of file
list of uint32_t tlvs
}list of tlvs
```
*
Need the
`N_RB`
value to be non-zero and obtained from the config file. (carrier config grid size)
`int N_RB = gNB_config->carrier_config.dl_grid_size[gNB_config->ssb_config.scs_common.value].value;`
*
how is this
`gNB_config`
assigned its values?
### 19/06/20
*
`ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);`
sloc: 1428 in
`nr-ru.c`
*
the
`ru->rfdevice`
has all members zero or null.
*
This issue was solved by adding
`sdr_addrs`
to config file of PNF.
*
`if (cfg->tdd_table.max_tdd_periodicity_list[nr_tti].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value==1`
*
throws segmentation error
*
`max_tdd_periodicity_list`
is not assigned memory
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
View file @
315288de
...
@@ -704,7 +704,7 @@ static uint8_t pack_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
...
@@ -704,7 +704,7 @@ static uint8_t pack_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
pack_tlv
(
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_subcarrier_offset
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_subcarrier_offset
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_TDD_PERIOD_TAG
,
&
(
pNfapiMsg
->
tdd_table
.
tdd_period
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_TDD_PERIOD_TAG
,
&
(
pNfapiMsg
->
tdd_table
.
tdd_period
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_NFAPI_DOWNLINK_UES_PER_SUBFRAME_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
dl_ue_per_sf
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_NFAPI_DOWNLINK_UES_PER_SUBFRAME_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
dl_ue_per_sf
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
max_transmit_power
),
ppWritePackedMsg
,
end
,
&
pack_uint16_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
max_transmit_power
),
ppWritePackedMsg
,
end
,
&
pack_uint16_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_NFAPI_NRARFCN_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
nrarfcn
),
ppWritePackedMsg
,
end
,
&
pack_uint32_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_NFAPI_NRARFCN_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
nrarfcn
),
ppWritePackedMsg
,
end
,
&
pack_uint32_tlv_value
)
&&
...
@@ -1644,6 +1644,7 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
...
@@ -1644,6 +1644,7 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
{
NFAPI_NR_CONFIG_SSB_PERIOD_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_period
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_SSB_PERIOD_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_period
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_subcarrier_offset
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_subcarrier_offset
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_TDD_PERIOD_TAG
,
&
(
pNfapiMsg
->
tdd_table
.
tdd_period
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_TDD_PERIOD_TAG
,
&
(
pNfapiMsg
->
tdd_table
.
tdd_period
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_NFAPI_DOWNLINK_UES_PER_SUBFRAME_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
dl_ue_per_sf
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_NFAPI_DOWNLINK_UES_PER_SUBFRAME_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
dl_ue_per_sf
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
max_transmit_power
),
&
unpack_uint16_tlv_value
},
{
NFAPI_NR_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
max_transmit_power
),
&
unpack_uint16_tlv_value
},
{
NFAPI_NR_NFAPI_NRARFCN_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
nrarfcn
),
&
unpack_uint32_tlv_value
},
{
NFAPI_NR_NFAPI_NRARFCN_TAG
,
&
(
pNfapiMsg
->
nfapi_config
.
nrarfcn
),
&
unpack_uint32_tlv_value
},
...
...
nfapi/open-nFAPI/pnf/src/pnf.c
View file @
315288de
...
@@ -30,6 +30,25 @@
...
@@ -30,6 +30,25 @@
#include "nfapi_nr_interface_scf.h"
#include "nfapi_nr_interface_scf.h"
#include "pnf.h"
#include "pnf.h"
# if 1 // for hard-code (remove later)
#include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h"
#include "common/ran_context.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_ServingCellConfigCommon.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "SCHED_NR/phy_frame_config_nr.h"
#include "NR_MIB.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_common.h"
#endif
#define MAX_SCTP_STREAMS 16
#define MAX_SCTP_STREAMS 16
void
nfapi_pnf_phy_config_delete_all
(
nfapi_pnf_config_t
*
config
)
void
nfapi_pnf_phy_config_delete_all
(
nfapi_pnf_config_t
*
config
)
...
@@ -353,6 +372,11 @@ void pnf_handle_config_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
...
@@ -353,6 +372,11 @@ void pnf_handle_config_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
if
(
config
->
state
==
NFAPI_PNF_RUNNING
)
if
(
config
->
state
==
NFAPI_PNF_RUNNING
)
{
{
nfapi_pnf_phy_config_t
*
phy
=
nfapi_pnf_phy_config_find
(
config
,
req
.
header
.
phy_id
);
nfapi_pnf_phy_config_t
*
phy
=
nfapi_pnf_phy_config_find
(
config
,
req
.
header
.
phy_id
);
#if 1 // emulate set_config TLV reception (hard-code)
int
tdd_return
=
set_tdd_config_nr
(
&
req
,
1
,
7
,
6
,
2
,
4
);
#endif
if
(
phy
)
if
(
phy
)
{
{
if
(
phy
->
state
!=
NFAPI_PNF_PHY_RUNNING
)
if
(
phy
->
state
!=
NFAPI_PNF_PHY_RUNNING
)
...
@@ -360,6 +384,8 @@ void pnf_handle_config_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
...
@@ -360,6 +384,8 @@ void pnf_handle_config_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
if
(
config
->
config_req
)
if
(
config
->
config_req
)
{
{
(
config
->
config_req
)(
config
,
phy
,
&
req
);
(
config
->
config_req
)(
config
,
phy
,
&
req
);
}
}
}
}
else
else
...
...
openair1/SCHED_NR/phy_frame_config_nr.c
View file @
315288de
...
@@ -118,7 +118,9 @@ int set_tdd_config_nr( nfapi_nr_config_request_scf_t *cfg,
...
@@ -118,7 +118,9 @@ int set_tdd_config_nr( nfapi_nr_config_request_scf_t *cfg,
while
(
slot_number
!=
nb_slots_to_set
)
{
while
(
slot_number
!=
nb_slots_to_set
)
{
if
(
nrofDownlinkSlots
!=
0
)
{
if
(
nrofDownlinkSlots
!=
0
)
{
for
(
int
number_of_symbol
=
0
;
number_of_symbol
<
nrofDownlinkSlots
*
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
number_of_symbol
++
)
{
for
(
int
number_of_symbol
=
0
;
number_of_symbol
<
nrofDownlinkSlots
*
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
number_of_symbol
++
)
{
cfg
->
tdd_table
.
max_tdd_periodicity_list
[
slot_number
].
max_num_of_symbol_per_slot_list
[
number_of_symbol
%
NR_NUMBER_OF_SYMBOLS_PER_SLOT
].
slot_config
.
value
=
0
;
cfg
->
tdd_table
.
max_tdd_periodicity_list
[
slot_number
].
max_num_of_symbol_per_slot_list
[
number_of_symbol
%
NR_NUMBER_OF_SYMBOLS_PER_SLOT
].
slot_config
.
value
=
0
;
// was 0, made 10 to check
// cfg->tdd_table.max_tdd_periodicity_list[slot_number].max_num_of_symbol_per_slot_list[number_of_symbol%NR_NUMBER_OF_SYMBOLS_PER_SLOT].slot_config.tl.tag= NFAPI_NR_CONFIG_SLOT_CONFIG_TAG;
if
((
number_of_symbol
+
1
)
%
NR_NUMBER_OF_SYMBOLS_PER_SLOT
==
0
)
if
((
number_of_symbol
+
1
)
%
NR_NUMBER_OF_SYMBOLS_PER_SLOT
==
0
)
slot_number
++
;
slot_number
++
;
...
@@ -318,6 +320,7 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_tti)
...
@@ -318,6 +320,7 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_tti)
return
(
NR_UPLINK_SLOT
|
NR_DOWNLINK_SLOT
);
return
(
NR_UPLINK_SLOT
|
NR_DOWNLINK_SLOT
);
}
}
#if 1 // Hardcoding, change later
if
(
nr_frame
%
2
==
0
)
{
if
(
nr_frame
%
2
==
0
)
{
for
(
int
symbol_count
=
0
;
symbol_count
<
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
symbol_count
++
)
{
for
(
int
symbol_count
=
0
;
symbol_count
<
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
symbol_count
++
)
{
if
(
cfg
->
tdd_table
.
max_tdd_periodicity_list
[
nr_tti
].
max_num_of_symbol_per_slot_list
[
symbol_count
].
slot_config
.
value
==
1
)
{
if
(
cfg
->
tdd_table
.
max_tdd_periodicity_list
[
nr_tti
].
max_num_of_symbol_per_slot_list
[
symbol_count
].
slot_config
.
value
==
1
)
{
...
@@ -367,6 +370,11 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_tti)
...
@@ -367,6 +370,11 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_tti)
return
(
NR_MIXED_SLOT
);
return
(
NR_MIXED_SLOT
);
}
}
}
}
#else
return
(
NR_DOWNLINK_SLOT
);
#endif
}
}
/*******************************************************************
/*******************************************************************
...
...
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