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
spbro
OpenXG-RAN
Commits
d04a83ea
Commit
d04a83ea
authored
Aug 16, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
defs_gNB cleanup
parent
46a1d2a6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
169 deletions
+34
-169
executables/nr-gnb.c
executables/nr-gnb.c
+1
-2
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-5
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+2
-3
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+29
-152
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+0
-5
No files found.
executables/nr-gnb.c
View file @
d04a83ea
...
...
@@ -498,7 +498,6 @@ void init_gNB(int wait_for_sync) {
LOG_I
(
PHY
,
"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p
\n
"
,
inst
,
RC
.
gNB
[
inst
]);
}
gNB
=
RC
.
gNB
[
inst
];
gNB
->
abstraction_flag
=
0
;
/*nr_polar_init(&gNB->nrPolar_params,
NR_POLAR_PBCH_MESSAGE_TYPE,
NR_POLAR_PBCH_PAYLOAD_BITS,
...
...
executables/nr-softmodem.c
View file @
d04a83ea
...
...
@@ -162,11 +162,6 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
abort
();
}
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
* this is very hackish - find a proper solution
*/
uint8_t
abstraction_flag
=
0
;
/* forward declarations */
void
set_default_frame_parms
(
nfapi_nr_config_request_scf_t
*
config
[
MAX_NUM_CCs
],
NR_DL_FRAME_PARMS
*
frame_parms
[
MAX_NUM_CCs
]);
...
...
nfapi/oai_integration/nfapi_vnf.c
View file @
d04a83ea
...
...
@@ -262,7 +262,6 @@ void oai_create_gnb(void) {
gNB
->
Mod_id
=
bodge_counter
;
gNB
->
CC_id
=
bodge_counter
;
gNB
->
abstraction_flag
=
0
;
RC
.
nb_nr_CC
[
bodge_counter
]
=
1
;
if
(
gNB
->
if_inst
==
0
)
{
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
d04a83ea
...
...
@@ -24,7 +24,7 @@
#include "PHY/defs_nr_UE.h"
//#include "PHY/defs_gNB.h"
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
* @{
*/
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
d04a83ea
...
...
@@ -417,7 +417,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
//printf("start rx segment %d\n",r);
uint32_t
E
=
nr_get_E
(
G
,
harq_process
->
C
,
dlsch
->
dlsch_config
.
qamModOrder
,
dlsch
->
Nl
,
r
);
decParams
.
R
=
nr_get_R_ldpc_decoder
(
dlsch
->
dlsch_config
.
rv
,
E
,
decParams
.
BG
,
decParams
.
Z
,
&
harq_process
->
llrLen
,
harq_process
->
DLround
);
union
ldpcReqUnion
id
=
{.
s
=
{
dlsch
->
rnti
,
frame
,
nr_slot_rx
,
0
,
0
}};
union
ldpcReqUnion
id
=
{.
s
=
{
dlsch
->
rnti
,
frame
,
nr_slot_rx
,
0
,
0
}};
notifiedFIFO_elt_t
*
req
=
newNotifiedFIFO_elt
(
sizeof
(
ldpcDecode_ue_t
),
id
.
p
,
&
nf
,
&
nr_processDLSegment
);
ldpcDecode_ue_t
*
rdata
=
(
ldpcDecode_ue_t
*
)
NotifiedFifoData
(
req
);
...
...
openair1/PHY/defs_gNB.h
View file @
d04a83ea
...
...
@@ -53,7 +53,6 @@ typedef struct {
int
lut
[
MAX_PUCCH0_NID
][
160
][
14
];
}
NR_gNB_PUCCH0_LUT_t
;
typedef
struct
{
uint32_t
pbch_a
;
uint32_t
pbch_a_interleaved
;
...
...
@@ -61,15 +60,6 @@ typedef struct {
uint32_t
pbch_e
[
NR_POLAR_PBCH_E_DWORD
];
}
NR_gNB_PBCH
;
typedef
enum
{
NR_SCH_IDLE
,
NR_ACTIVE
,
NR_CBA_ACTIVE
,
NR_DISABLED
}
NR_SCH_status_t
;
typedef
struct
{
/// Nfapi DLSCH PDU
nfapi_nr_dl_tti_pdsch_pdu
pdsch_pdu
;
...
...
@@ -81,8 +71,6 @@ typedef struct {
uint8_t
**
c
;
/// Frame where current HARQ round was sent
uint32_t
frame
;
/// Subframe where current HARQ round was sent
uint32_t
subframe
;
/// Interleaver outputs
uint8_t
*
f
;
/// LDPC lifting size
...
...
@@ -221,6 +209,7 @@ typedef struct {
int
llrLen
;
//////////////////////////////////////////////////////////////
}
NR_UL_gNB_HARQ_t
;
static
inline
int
lenWithCrc
(
int
nbSeg
,
int
len
)
{
if
(
nbSeg
>
1
)
...
...
@@ -237,24 +226,8 @@ static inline int crcType(int nbSeg, int len)
typedef
struct
{
//! estimated rssi (dBm)
int
rx_rssi_dBm
;
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int
rx_correlation
[
2
];
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int
rx_correlation_dB
[
2
];
/// Wideband CQI (= SINR)
int
wideband_cqi
[
MAX_NUM_RU_PER_gNB
];
/// Wideband CQI in dB (= SINR dB)
int
wideband_cqi_dB
[
MAX_NUM_RU_PER_gNB
];
/// Wideband CQI (sum of all RX antennas, in dB)
char
wideband_cqi_tot
;
/// Subband CQI per RX antenna and RB (= SINR)
int
subband_cqi
[
MAX_NUM_RU_PER_gNB
][
275
];
/// Total Subband CQI and RB (= SINR)
int
subband_cqi_tot
[
275
];
/// Subband CQI in dB and RB (= SINR dB)
int
subband_cqi_dB
[
MAX_NUM_RU_PER_gNB
][
275
];
/// Total Subband CQI and RB
int
subband_cqi_tot_dB
[
275
];
}
ulsch_measurements_gNB
;
typedef
struct
{
...
...
@@ -393,25 +366,10 @@ typedef struct {
/// \brief Instance count for RXn-TXnp4 processing thread.
/// \internal This variable is protected by \ref mutex_rxtx.
int
instance_cnt
;
/// pthread structure for RXn-TXnp4 processing thread
pthread_t
pthread
;
/// pthread attributes for RXn-TXnp4 processing thread
pthread_attr_t
attr
;
/// condition variable for tx processing thread
pthread_cond_t
cond
;
/// mutex for RXn-TXnp4 processing thread
pthread_mutex_t
mutex
;
/// scheduling parameters for RXn-TXnp4 thread
struct
sched_param
sched_param_rxtx
;
/// \internal This variable is protected by \ref mutex_RUs_tx.
int
instance_cnt_RUs
;
/// condition variable for tx processing thread
pthread_cond_t
cond_RUs
;
/// mutex for L1 RXTX processing thread
pthread_mutex_t
mutex_RUs
;
/// mutex for L1 TX FH synchronization
pthread_mutex_t
mutex_RUs_tx
;
}
gNB_L1_rxtx_proc_t
;
...
...
@@ -419,85 +377,21 @@ typedef struct {
typedef
struct
gNB_L1_proc_t_s
{
/// Component Carrier index
uint8_t
CC_id
;
/// thread index
int
thread_index
;
/// timestamp received from HW
openair0_timestamp
timestamp_rx
;
/// timestamp to send to "slave rru"
openair0_timestamp
timestamp_tx
;
/// slot to act upon for reception
int
slot_rx
;
/// slot to act upon for PRACH
int
slot_prach
;
/// frame to act upon for reception
int
frame_rx
;
/// frame to act upon for transmission
int
frame_tx
;
/// frame to act upon for PRACH
int
frame_prach
;
/// \internal This variable is protected by \ref mutex_td.
int
instance_cnt_td
;
/// \internal This variable is protected by \ref mutex_te.
int
instance_cnt_te
;
/// \internal This variable is protected by \ref mutex_prach.
int
instance_cnt_prach
;
/// \internal This variable is protected by \ref mutex_asynch_rxtx.
int
instance_cnt_asynch_rxtx
;
/// pthread structure for eNB single processing thread
pthread_t
pthread_single
;
/// pthread structure for asychronous RX/TX processing thread
pthread_t
pthread_asynch_rxtx
;
/// pthread structure for dumping L1 stats
pthread_t
L1_stats_thread
;
/// pthread structure for printing time meas
pthread_t
process_stats_thread
;
/// pthread structure for reordering L1 tx thread messages
pthread_t
pthread_tx_reorder
;
/// flag to indicate first RX acquisition
int
first_rx
;
/// flag to indicate first TX transmission
int
first_tx
;
/// pthread attributes for single gNB processing thread
pthread_attr_t
attr_single
;
/// pthread attributes for prach processing thread
pthread_attr_t
attr_prach
;
/// pthread attributes for asynchronous RX thread
pthread_attr_t
attr_asynch_rxtx
;
/// scheduling parameters for parallel turbo-decoder thread
struct
sched_param
sched_param_td
;
/// scheduling parameters for parallel turbo-encoder thread
struct
sched_param
sched_param_te
;
/// scheduling parameters for single eNB thread
struct
sched_param
sched_param_single
;
/// scheduling parameters for prach thread
struct
sched_param
sched_param_prach
;
/// scheduling parameters for asynch_rxtx thread
struct
sched_param
sched_param_asynch_rxtx
;
pthread_cond_t
cond_prach
;
/// condition variable for asynch RX/TX thread
pthread_cond_t
cond_asynch_rxtx
;
/// mutex for parallel turbo-decoder thread
pthread_mutex_t
mutex_td
;
/// mutex for parallel turbo-encoder thread
pthread_mutex_t
mutex_te
;
/// mutex for PRACH thread
pthread_mutex_t
mutex_prach
;
/// mutex for asynch RX/TX thread
pthread_mutex_t
mutex_asynch_rxtx
;
/// mutex for RU access to eNB processing (PDSCH/PUSCH)
pthread_mutex_t
mutex_RU
;
/// mutex for RU_tx access to eNB_tx processing (PDSCH/PUSCH)
pthread_mutex_t
mutex_RU_tx
;
/// mutex for RU access to eNB processing (PRACH)
pthread_mutex_t
mutex_RU_PRACH
;
/// mutex for RU access to eNB processing (PRACH BR)
pthread_mutex_t
mutex_RU_PRACH_br
;
/// mask for RUs serving eNB (PDSCH/PUSCH)
int
RU_mask
,
RU_mask_tx
;
/// mask for RUs serving eNB (PRACH)
int
RU_mask_prach
;
/// set of scheduling variables RXn-TXnp4 threads
gNB_L1_rxtx_proc_t
L1_proc
,
L1_proc_tx
;
gNB_L1_rxtx_proc_t
L1_proc
;
gNB_L1_rxtx_proc_t
L1_proc_tx
;
}
gNB_L1_proc_t
;
typedef
struct
{
...
...
@@ -524,7 +418,6 @@ typedef struct {
int
n0_subband_power_tot_dBm
[
275
];
/// PRACH background noise level
int
prach_I0
;
}
PHY_MEASUREMENTS_gNB
;
...
...
@@ -543,7 +436,6 @@ typedef struct PHY_VARS_gNB_s {
uint8_t
CC_id
;
uint8_t
configured
;
gNB_L1_proc_t
proc
;
int
abstraction_flag
;
int
num_RU
;
RU_t
*
RU_list
[
MAX_NUM_RU_PER_gNB
];
/// Ethernet parameters for northbound midhaul interface
...
...
@@ -552,7 +444,6 @@ typedef struct PHY_VARS_gNB_s {
eth_params_t
eth_params
;
int
rx_total_gain_dB
;
int
(
*
nr_start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_gNB_s
*
gNB
);
uint8_t
local_flag
;
nfapi_nr_config_request_scf_t
gNB_config
;
NR_DL_FRAME_PARMS
frame_parms
;
PHY_MEASUREMENTS_gNB
measurements
;
...
...
@@ -635,15 +526,11 @@ typedef struct PHY_VARS_gNB_s {
uint64_t
bad_pucch
;
int
num_ulprbbl
;
int
ulprbbl
[
275
];
/*
time_stats_t phy_proc;
*/
time_stats_t
phy_proc_tx
;
time_stats_t
phy_proc_rx
;
time_stats_t
rx_prach
;
/*
time_stats_t ofdm_mod_stats;
*/
time_stats_t
dlsch_encoding_stats
;
time_stats_t
dlsch_modulation_stats
;
time_stats_t
dlsch_scrambling_stats
;
...
...
@@ -678,10 +565,6 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t
srs_beam_report_stats
;
time_stats_t
srs_iq_matrix_stats
;
/*
time_stats_t rx_dft_stats;
time_stats_t ulsch_freq_offset_estimation_stats;
*/
notifiedFIFO_t
respPuschSymb
;
notifiedFIFO_t
respDecode
;
notifiedFIFO_t
resp_L1
;
...
...
@@ -739,7 +622,7 @@ typedef struct LDPCDecode_s {
struct
ldpcReqId
{
uint16_t
rnti
;
uint16_t
frame
;
uint8_t
s
ubframe
;
uint8_t
s
lot
;
uint8_t
codeblock
;
uint16_t
spare
;
}
__attribute__
((
packed
));
...
...
@@ -756,12 +639,6 @@ typedef struct processingData_L1 {
PHY_VARS_gNB
*
gNB
;
}
processingData_L1_t
;
typedef
enum
{
FILLED
,
FILLING
,
NOT_FILLED
}
msgStatus_t
;
typedef
struct
processingData_L1tx
{
int
frame
;
int
slot
;
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
d04a83ea
...
...
@@ -135,11 +135,6 @@ int main(int argc, char **argv){
int
prachOccasion
=
0
;
double
DS_TDL
=
.
03
;
// int8_t interf1=-19,interf2=-19;
// uint8_t abstraction_flag=0,calibration_flag=0;
// double prach_sinr;
// uint32_t nsymb;
// uint16_t preamble_max, preamble_energy_max;
FILE
*
input_fd
=
NULL
;
char
*
input_file
=
NULL
;
int
n_bytes
=
0
;
...
...
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