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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
fe10c902
Commit
fe10c902
authored
Nov 06, 2024
by
Bartosz Podrygajlo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid passing gNB pointer to nr_pusch_antenna_processing
parent
5605b0c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+19
-19
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+4
-2
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
fe10c902
...
...
@@ -66,13 +66,10 @@ __attribute__((always_inline)) inline c16_t c32x16cumulVectVectWithSteps(c16_t *
static
void
nr_pusch_antenna_processing
(
void
*
arg
)
{
puschAntennaProc_t
*
rdata
=
(
puschAntennaProc_t
*
)
arg
;
PHY_VARS_gNB
*
gNB
=
rdata
->
gNB
;
unsigned
char
Ns
=
rdata
->
Ns
;
int
nl
=
rdata
->
nl
;
unsigned
short
p
=
rdata
->
p
;
unsigned
char
symbol
=
rdata
->
symbol
;
int
ul_id
=
rdata
->
ul_id
;
int
aarx
=
rdata
->
aarx
;
int
numAntennas
=
rdata
->
numAntennas
;
unsigned
short
bwp_start_subcarrier
=
rdata
->
bwp_start_subcarrier
;
...
...
@@ -83,11 +80,12 @@ static void nr_pusch_antenna_processing(void *arg)
int
nest_count
=
*
(
rdata
->
nest_count
);
delay_t
*
delay
=
rdata
->
delay
;
const
int
chest_freq
=
gNB
->
chest_freq
;
NR_gNB_PUSCH
*
pusch_vars
=
&
gNB
->
pusch_vars
[
ul_id
]
;
const
int
chest_freq
=
rdata
->
chest_freq
;
NR_gNB_PUSCH
*
pusch_vars
=
rdata
->
pusch_vars
;
c16_t
**
ul_ch_estimates
=
(
c16_t
**
)
pusch_vars
->
ul_ch_estimates
;
const
int
symbolSize
=
gNB
->
frame_parms
.
ofdm_symbol_size
;
const
int
slot_offset
=
(
Ns
&
3
)
*
gNB
->
frame_parms
.
symbols_per_slot
*
symbolSize
;
NR_DL_FRAME_PARMS
*
frame_parms
=
rdata
->
frame_parms
;
const
int
symbolSize
=
frame_parms
->
ofdm_symbol_size
;
const
int
slot_offset
=
(
Ns
&
3
)
*
frame_parms
->
symbols_per_slot
*
symbolSize
;
const
int
delta
=
get_delta
(
p
,
pusch_pdu
->
dmrs_config_type
);
const
int
symbol_offset
=
symbolSize
*
symbol
;
const
int
k0
=
bwp_start_subcarrier
;
...
...
@@ -96,8 +94,8 @@ static void nr_pusch_antenna_processing(void *arg)
for
(
int
antenna
=
aarx
;
antenna
<
aarx
+
numAntennas
;
antenna
++
)
{
c16_t
ul_ls_est
[
symbolSize
]
__attribute__
((
aligned
(
32
)));
memset
(
ul_ls_est
,
0
,
sizeof
(
c16_t
)
*
symbolSize
);
c16_t
*
rxdataF
=
(
c16_t
*
)
&
gNB
->
common_vars
.
rxdataF
[
beam_nb
][
antenna
][
symbol_offset
+
slot_offset
];
c16_t
*
ul_ch
=
&
ul_ch_estimates
[
nl
*
gNB
->
frame_parms
.
nb_antennas_rx
+
antenna
][
symbol_offset
];
c16_t
*
rxdataF
=
(
c16_t
*
)
&
rdata
->
rxdataF
[
beam_nb
][
antenna
][
symbol_offset
+
slot_offset
];
c16_t
*
ul_ch
=
&
ul_ch_estimates
[
nl
*
frame_parms
->
nb_antennas_rx
+
antenna
][
symbol_offset
];
memset
(
ul_ch
,
0
,
sizeof
(
*
ul_ch
)
*
symbolSize
);
LOG_D
(
PHY
,
...
...
@@ -111,12 +109,12 @@ static void nr_pusch_antenna_processing(void *arg)
#ifdef DEBUG_PUSCH
LOG_I
(
PHY
,
"symbol_offset %d, delta %d
\n
"
,
symbol_offset
,
delta
);
LOG_I
(
PHY
,
"ch est pilot, N_RB_UL %d
\n
"
,
gNB
->
frame_parms
.
N_RB_UL
);
LOG_I
(
PHY
,
"ch est pilot, N_RB_UL %d
\n
"
,
frame_parms
->
N_RB_UL
);
LOG_I
(
PHY
,
"bwp_start_subcarrier %d, k0 %d, first_carrier %d, nb_rb_pusch %d
\n
"
,
bwp_start_subcarrier
,
k0
,
gNB
->
frame_parms
.
first_carrier_offset
,
frame_parms
->
first_carrier_offset
,
nb_rb_pusch
);
LOG_I
(
PHY
,
"ul_ch addr %p
\n
"
,
ul_ch
);
#endif
...
...
@@ -145,9 +143,9 @@ static void nr_pusch_antenna_processing(void *arg)
pilot_cnt
+=
2
;
}
nr_est_delay
(
gNB
->
frame_parms
.
ofdm_symbol_size
,
ul_ls_est
,
(
c16_t
*
)
pusch_vars
->
ul_ch_estimates_time
[
antenna
],
delay
);
nr_est_delay
(
frame_parms
->
ofdm_symbol_size
,
ul_ls_est
,
(
c16_t
*
)
pusch_vars
->
ul_ch_estimates_time
[
antenna
],
delay
);
int
delay_idx
=
get_delay_idx
(
delay
->
est_delay
,
MAX_DELAY_COMP
);
c16_t
*
ul_delay_table
=
gNB
->
frame_parms
.
delay_table
[
delay_idx
];
c16_t
*
ul_delay_table
=
frame_parms
->
delay_table
[
delay_idx
];
#ifdef DEBUG_PUSCH
printf
(
"Estimated delay = %i
\n
"
,
delay
->
est_delay
>>
1
);
...
...
@@ -193,9 +191,9 @@ static void nr_pusch_antenna_processing(void *arg)
// Revert delay
pilot_cnt
=
0
;
ul_ch
=
&
ul_ch_estimates
[
nl
*
gNB
->
frame_parms
.
nb_antennas_rx
+
antenna
][
symbol_offset
];
ul_ch
=
&
ul_ch_estimates
[
nl
*
frame_parms
->
nb_antennas_rx
+
antenna
][
symbol_offset
];
int
inv_delay_idx
=
get_delay_idx
(
-
delay
->
est_delay
,
MAX_DELAY_COMP
);
c16_t
*
ul_inv_delay_table
=
gNB
->
frame_parms
.
delay_table
[
inv_delay_idx
];
c16_t
*
ul_inv_delay_table
=
frame_parms
->
delay_table
[
inv_delay_idx
];
for
(
int
n
=
0
;
n
<
3
*
nb_rb_pusch
;
n
++
)
{
for
(
int
k_line
=
0
;
k_line
<=
1
;
k_line
++
)
{
int
k
=
pilot_cnt
<<
1
;
...
...
@@ -233,9 +231,9 @@ static void nr_pusch_antenna_processing(void *arg)
}
// Delay compensation
nr_est_delay
(
gNB
->
frame_parms
.
ofdm_symbol_size
,
ul_ls_est
,
(
c16_t
*
)
pusch_vars
->
ul_ch_estimates_time
[
antenna
],
delay
);
nr_est_delay
(
frame_parms
->
ofdm_symbol_size
,
ul_ls_est
,
(
c16_t
*
)
pusch_vars
->
ul_ch_estimates_time
[
antenna
],
delay
);
int
delay_idx
=
get_delay_idx
(
-
delay
->
est_delay
,
MAX_DELAY_COMP
);
c16_t
*
ul_delay_table
=
gNB
->
frame_parms
.
delay_table
[
delay_idx
];
c16_t
*
ul_delay_table
=
frame_parms
->
delay_table
[
delay_idx
];
for
(
int
n
=
0
;
n
<
nb_rb_pusch
*
NR_NB_SC_PER_RB
;
n
++
)
{
ul_ch
[
n
]
=
c16mulShift
(
ul_ls_est
[
n
],
ul_delay_table
[
n
%
6
],
8
);
}
...
...
@@ -513,14 +511,12 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
puschAntennaProc_t
*
rdata
=
(
puschAntennaProc_t
*
)
NotifiedFifoData
(
req
);
// data for the job
// Local init in the current loop
rdata
->
gNB
=
gNB
;
rdata
->
Ns
=
Ns
;
rdata
->
nl
=
nl
;
rdata
->
p
=
p
;
rdata
->
symbol
=
symbol
;
rdata
->
aarx
=
aarx
;
rdata
->
numAntennas
=
numAntennas
;
rdata
->
ul_id
=
ul_id
;
rdata
->
bwp_start_subcarrier
=
bwp_start_subcarrier
;
rdata
->
pusch_pdu
=
pusch_pdu
;
rdata
->
max_ch
=
&
max_ch_arr
[
rdata
->
aarx
];
...
...
@@ -529,6 +525,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
rdata
->
noise_amp2
=
&
noise_amp2_arr
[
rdata
->
aarx
];
rdata
->
delay
=
&
delay_arr
[
rdata
->
aarx
];
rdata
->
beam_nb
=
beam_nb
;
rdata
->
frame_parms
=
&
gNB
->
frame_parms
;
rdata
->
pusch_vars
=
&
gNB
->
pusch_vars
[
ul_id
];
rdata
->
chest_freq
=
gNB
->
chest_freq
;
rdata
->
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
// Call the nr_pusch_antenna_processing function
pushTpool
(
&
gNB
->
threadPool
,
req
);
nbAarx
++
;
...
...
openair1/PHY/defs_gNB.h
View file @
fe10c902
...
...
@@ -591,12 +591,10 @@ union puschSymbolReqUnion {
};
typedef
struct
puschAntennaProc_s
{
PHY_VARS_gNB
*
gNB
;
unsigned
char
Ns
;
int
nl
;
unsigned
short
p
;
unsigned
char
symbol
;
int
ul_id
;
unsigned
short
bwp_start_subcarrier
;
int
aarx
;
int
beam_nb
;
...
...
@@ -607,6 +605,10 @@ typedef struct puschAntennaProc_s {
int
*
nest_count
;
uint64_t
*
noise_amp2
;
delay_t
*
delay
;
int
chest_freq
;
NR_gNB_PUSCH
*
pusch_vars
;
NR_DL_FRAME_PARMS
*
frame_parms
;
c16_t
***
rxdataF
;
}
puschAntennaProc_t
;
struct
puschAntennaReqId
{
...
...
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