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
zzha zzha
OpenXG-RAN
Commits
36a9139a
Commit
36a9139a
authored
Jul 07, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove N_cdm_groups, CDM_group_size, kprime and lprime from nr_csi_rs_info_t
parent
e39be391
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
62 deletions
+101
-62
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
+22
-15
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+8
-3
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+70
-38
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+0
-5
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
View file @
36a9139a
...
...
@@ -45,10 +45,15 @@ void nr_init_csi_rs(const NR_DL_FRAME_PARMS *fp, uint32_t ***csi_rs, uint32_t Ni
void
nr_generate_csi_rs
(
const
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
dataF
,
int16_t
amp
,
const
int16_t
amp
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
,
int
slot
){
const
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
,
const
int
slot
,
uint8_t
*
N_cdm_groups
,
uint8_t
*
CDM_group_size
,
uint8_t
*
k_prime
,
uint8_t
*
l_prime
,
uint8_t
*
N_ports
)
{
#ifdef NR_CSIRS_DEBUG
LOG_I
(
NR_PHY
,
"csi_params->subcarrier_spacing = %i
\n
"
,
csi_params
->
subcarrier_spacing
);
...
...
@@ -638,23 +643,25 @@ void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms,
}
}
}
nr_csi_rs_info
->
N_cdm_groups
=
size
;
nr_csi_rs_info
->
CDM_group_size
=
gs
;
nr_csi_rs_info
->
k
prime
=
kprime
;
nr_csi_rs_info
->
l
prime
=
lprime
;
nr_csi_rs_info
->
N_ports
=
ports
;
if
(
N_cdm_groups
)
*
N_cdm_groups
=
size
;
if
(
CDM_group_size
)
*
CDM_group_size
=
gs
;
if
(
k_prime
)
*
k_
prime
=
kprime
;
if
(
l_prime
)
*
l_
prime
=
lprime
;
if
(
N_ports
)
*
N_ports
=
ports
;
memcpy
(
nr_csi_rs_info
->
j
,
j
,
16
*
sizeof
(
uint8_t
));
memcpy
(
nr_csi_rs_info
->
koverline
,
koverline
,
16
*
sizeof
(
uint8_t
));
memcpy
(
nr_csi_rs_info
->
loverline
,
loverline
,
16
*
sizeof
(
uint8_t
));
#ifdef NR_CSIRS_DEBUG
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->N_ports = %d
\n
"
,
nr_csi_rs_info
->
N_ports
);
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->N_cdm_groups = %d
\n
"
,
nr_csi_rs_info
->
N_cdm_groups
);
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->CDM_group_size = %d
\n
"
,
nr_csi_rs_info
->
CDM_group_size
);
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->kprime = %d
\n
"
,
nr_csi_rs_info
->
kprime
);
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->lprime = %d
\n
"
,
nr_csi_rs_info
->
lprime
);
for
(
int
ji
=
0
;
ji
<
nr_csi_rs_info
->
N_cdm_groups
;
ji
++
)
{
LOG_I
(
NR_PHY
,
"(CDM group %d) j = %d, koverline = %d, loverline = %d
\n
"
,
ji
,
nr_csi_rs_info
->
j
[
ji
],
nr_csi_rs_info
->
koverline
[
ji
],
nr_csi_rs_info
->
loverline
[
ji
]);
if
(
N_ports
)
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->N_ports = %d
\n
"
,
*
N_ports
);
if
(
N_cdm_groups
)
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->N_cdm_groups = %d
\n
"
,
*
N_cdm_groups
);
if
(
CDM_group_size
)
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->CDM_group_size = %d
\n
"
,
*
CDM_group_size
);
if
(
k_prime
)
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->kprime = %d
\n
"
,
*
k_prime
);
if
(
l_prime
)
LOG_I
(
NR_PHY
,
"nr_csi_rs_info->lprime = %d
\n
"
,
*
l_prime
);
if
(
N_cdm_groups
)
{
for
(
int
ji
=
0
;
ji
<*
N_cdm_groups
;
ji
++
)
{
LOG_I
(
NR_PHY
,
"(CDM group %d) j = %d, koverline = %d, loverline = %d
\n
"
,
ji
,
nr_csi_rs_info
->
j
[
ji
],
nr_csi_rs_info
->
koverline
[
ji
],
nr_csi_rs_info
->
loverline
[
ji
]);
}
}
#endif
}
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
36a9139a
...
...
@@ -339,10 +339,15 @@ uint8_t get_nr_prach_duration(uint8_t prach_format);
void
nr_generate_csi_rs
(
const
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
dataF
,
int16_t
amp
,
const
int16_t
amp
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
,
int
slot
);
const
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
,
const
int
slot
,
uint8_t
*
N_cdm_groups
,
uint8_t
*
CDM_group_size
,
uint8_t
*
k_prime
,
uint8_t
*
l_prime
,
uint8_t
*
N_ports
);
void
free_nr_prach_entry
(
PHY_VARS_gNB
*
gNB
,
int
prach_id
);
...
...
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
36a9139a
...
...
@@ -178,6 +178,10 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
const
UE_nr_rxtx_proc_t
*
proc
,
const
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
,
const
nr_csi_rs_info_t
*
nr_csi_rs_info
,
const
uint8_t
N_cdm_groups
,
const
uint8_t
CDM_group_size
,
const
uint8_t
k_prime
,
const
uint8_t
l_prime
,
int32_t
csi_rs_received_signal
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
int32_t
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
proc
->
thread_id
].
rxdataF
;
...
...
@@ -192,16 +196,16 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
continue
;
}
for
(
int
cdm_id
=
0
;
cdm_id
<
nr_csi_rs_info
->
N_cdm_groups
;
cdm_id
++
)
{
for
(
int
s
=
0
;
s
<
nr_csi_rs_info
->
CDM_group_size
;
s
++
)
{
for
(
int
cdm_id
=
0
;
cdm_id
<
N_cdm_groups
;
cdm_id
++
)
{
for
(
int
s
=
0
;
s
<
CDM_group_size
;
s
++
)
{
// loop over frequency resource elements within a group
for
(
int
kp
=
0
;
kp
<=
nr_csi_rs_info
->
k
prime
;
kp
++
)
{
for
(
int
kp
=
0
;
kp
<=
k_
prime
;
kp
++
)
{
uint16_t
k
=
(
frame_parms
->
first_carrier_offset
+
(
rb
*
NR_NB_SC_PER_RB
)
+
nr_csi_rs_info
->
koverline
[
cdm_id
]
+
kp
)
%
frame_parms
->
ofdm_symbol_size
;
// loop over time resource elements within a group
for
(
int
lp
=
0
;
lp
<=
nr_csi_rs_info
->
l
prime
;
lp
++
)
{
for
(
int
lp
=
0
;
lp
<=
l_
prime
;
lp
++
)
{
uint16_t
symb
=
lp
+
nr_csi_rs_info
->
loverline
[
cdm_id
];
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
c16_t
*
rx_signal
=
(
c16_t
*
)
&
rxdataF
[
ant_rx
][
symbol_offset
];
...
...
@@ -211,7 +215,7 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
#ifdef NR_CSIRS_DEBUG
int
dataF_offset
=
proc
->
nr_slot_rx
*
ue
->
frame_parms
.
samples_per_slot_wCP
;
uint16_t
port_tx
=
s
+
nr_csi_rs_info
->
j
[
cdm_id
]
*
nr_csi_rs_info
->
CDM_group_size
;
uint16_t
port_tx
=
s
+
nr_csi_rs_info
->
j
[
cdm_id
]
*
CDM_group_size
;
c16_t
*
tx_csi_rs_signal
=
(
c16_t
*
)
&
nr_csi_rs_info
->
csi_rs_generated_signal
[
port_tx
][
symbol_offset
+
dataF_offset
];
LOG_I
(
NR_PHY
,
"l,k (%2d,%4d) |
\t
port_tx %d (%4d,%4d)
\t
ant_rx %d (%4d,%4d)
\n
"
,
symb
,
...
...
@@ -254,8 +258,13 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
const
nr_csi_rs_info_t
*
nr_csi_rs_info
,
const
int32_t
**
csi_rs_generated_signal
,
const
int32_t
csi_rs_received_signal
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
int32_t
csi_rs_ls_estimated_channel
[][
ue
->
nr_csi_rs_info
->
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
int32_t
csi_rs_estimated_channel_freq
[][
ue
->
nr_csi_rs_info
->
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
const
uint8_t
N_cdm_groups
,
const
uint8_t
CDM_group_size
,
const
uint8_t
k_prime
,
const
uint8_t
l_prime
,
const
uint8_t
N_ports
,
int32_t
csi_rs_ls_estimated_channel
[][
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
int32_t
csi_rs_estimated_channel_freq
[][
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
int16_t
*
log2_re
,
int16_t
*
log2_maxh
,
uint32_t
*
noise_power
)
{
...
...
@@ -270,7 +279,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
/// LS channel estimation
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
memset
(
csi_rs_ls_estimated_channel
[
ant_rx
][
port_tx
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
}
...
...
@@ -281,19 +290,19 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
continue
;
}
for
(
int
cdm_id
=
0
;
cdm_id
<
nr_csi_rs_info
->
N_cdm_groups
;
cdm_id
++
)
{
for
(
int
s
=
0
;
s
<
nr_csi_rs_info
->
CDM_group_size
;
s
++
)
{
for
(
int
cdm_id
=
0
;
cdm_id
<
N_cdm_groups
;
cdm_id
++
)
{
for
(
int
s
=
0
;
s
<
CDM_group_size
;
s
++
)
{
uint16_t
port_tx
=
s
+
nr_csi_rs_info
->
j
[
cdm_id
]
*
nr_csi_rs_info
->
CDM_group_size
;
uint16_t
port_tx
=
s
+
nr_csi_rs_info
->
j
[
cdm_id
]
*
CDM_group_size
;
// loop over frequency resource elements within a group
for
(
int
kp
=
0
;
kp
<=
nr_csi_rs_info
->
k
prime
;
kp
++
)
{
for
(
int
kp
=
0
;
kp
<=
k_
prime
;
kp
++
)
{
uint16_t
kinit
=
(
frame_parms
->
first_carrier_offset
+
rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
uint16_t
k
=
kinit
+
nr_csi_rs_info
->
koverline
[
cdm_id
]
+
kp
;
// loop over time resource elements within a group
for
(
int
lp
=
0
;
lp
<=
nr_csi_rs_info
->
l
prime
;
lp
++
)
{
for
(
int
lp
=
0
;
lp
<=
l_
prime
;
lp
++
)
{
uint16_t
symb
=
lp
+
nr_csi_rs_info
->
loverline
[
cdm_id
];
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
c16_t
*
tx_csi_rs_signal
=
(
c16_t
*
)
&
csi_rs_generated_signal
[
port_tx
][
symbol_offset
+
dataF_offset
];
...
...
@@ -320,7 +329,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
}
for
(
int
k
=
0
;
k
<
frame_parms
->
ofdm_symbol_size
;
k
++
)
{
LOG_I
(
NR_PHY
,
"l,k (%2d,%4d) | "
,
symb
,
k
);
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
c16_t
*
tx_csi_rs_signal
=
(
c16_t
*
)
&
csi_rs_generated_signal
[
port_tx
][
symbol_offset
+
dataF_offset
];
c16_t
*
rx_csi_rs_signal
=
(
c16_t
*
)
&
csi_rs_received_signal
[
ant_rx
][
symbol_offset
];
...
...
@@ -338,7 +347,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
/// Channel interpolation
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
memset
(
csi_rs_estimated_channel_freq
[
ant_rx
][
port_tx
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
}
...
...
@@ -352,7 +361,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
count
++
;
uint16_t
k
=
(
frame_parms
->
first_carrier_offset
+
rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
int16_t
*
csi_rs_ls_estimated_channel16
=
(
int16_t
*
)
&
csi_rs_ls_estimated_channel
[
ant_rx
][
port_tx
][
k
];
int16_t
*
csi_rs_estimated_channel16
=
(
int16_t
*
)
&
csi_rs_estimated_channel_freq
[
ant_rx
][
port_tx
][
k
];
if
(
(
k
==
0
)
||
(
k
==
frame_parms
->
first_carrier_offset
)
)
{
// Start of OFDM symbol case or first occupied subcarrier case
...
...
@@ -367,14 +376,14 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
}
/// Power noise estimation
uint16_t
noise_real
[
frame_parms
->
nb_antennas_rx
][
nr_csi_rs_info
->
N_ports
][
csirs_config_pdu
->
nr_of_rbs
];
uint16_t
noise_imag
[
frame_parms
->
nb_antennas_rx
][
nr_csi_rs_info
->
N_ports
][
csirs_config_pdu
->
nr_of_rbs
];
uint16_t
noise_real
[
frame_parms
->
nb_antennas_rx
][
N_ports
][
csirs_config_pdu
->
nr_of_rbs
];
uint16_t
noise_imag
[
frame_parms
->
nb_antennas_rx
][
N_ports
][
csirs_config_pdu
->
nr_of_rbs
];
for
(
int
rb
=
csirs_config_pdu
->
start_rb
;
rb
<
(
csirs_config_pdu
->
start_rb
+
csirs_config_pdu
->
nr_of_rbs
);
rb
++
)
{
if
(
csirs_config_pdu
->
freq_density
<=
1
&&
csirs_config_pdu
->
freq_density
!=
(
rb
%
2
))
{
continue
;
}
uint16_t
k
=
(
frame_parms
->
first_carrier_offset
+
rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
c16_t
*
csi_rs_ls_estimated_channel16
=
(
c16_t
*
)
&
csi_rs_ls_estimated_channel
[
ant_rx
][
port_tx
][
k
];
c16_t
*
csi_rs_estimated_channel16
=
(
c16_t
*
)
&
csi_rs_estimated_channel_freq
[
ant_rx
][
port_tx
][
k
];
noise_real
[
ant_rx
][
port_tx
][
rb
-
csirs_config_pdu
->
start_rb
]
=
abs
(
csi_rs_ls_estimated_channel16
->
r
-
csi_rs_estimated_channel16
->
r
);
...
...
@@ -382,7 +391,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
maxh
=
cmax3
(
maxh
,
abs
(
csi_rs_estimated_channel16
->
r
),
abs
(
csi_rs_estimated_channel16
->
i
));
}
}
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
*
noise_power
+=
(
calc_power_csirs
(
noise_real
[
ant_rx
][
port_tx
],
csirs_config_pdu
)
+
calc_power_csirs
(
noise_imag
[
ant_rx
][
port_tx
],
csirs_config_pdu
));
}
...
...
@@ -392,7 +401,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
(
k
-
frame_parms
->
first_carrier_offset
)
/
NR_NB_SC_PER_RB
:
(
k
+
frame_parms
->
ofdm_symbol_size
-
frame_parms
->
first_carrier_offset
)
/
NR_NB_SC_PER_RB
;
LOG_I
(
NR_PHY
,
"(k = %4d) |
\t
"
,
k
);
for
(
uint16_t
port_tx
=
0
;
port_tx
<
nr_csi_rs_info
->
N_ports
;
port_tx
++
)
{
for
(
uint16_t
port_tx
=
0
;
port_tx
<
N_ports
;
port_tx
++
)
{
c16_t
*
csi_rs_ls_estimated_channel16
=
(
c16_t
*
)
&
csi_rs_ls_estimated_channel
[
ant_rx
][
port_tx
][
0
];
c16_t
*
csi_rs_estimated_channel16
=
(
c16_t
*
)
&
csi_rs_estimated_channel_freq
[
ant_rx
][
port_tx
][
0
];
printf
(
"Channel port_tx %d --> ant_rx %d : ls (%4d,%4d), int (%4d,%4d), noise (%4d,%4d) | "
,
...
...
@@ -408,7 +417,7 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
}
*
noise_power
/=
(
frame_parms
->
nb_antennas_rx
*
nr_csi_rs_info
->
N_ports
);
*
noise_power
/=
(
frame_parms
->
nb_antennas_rx
*
N_ports
);
*
log2_maxh
=
log2_approx
(
maxh
-
1
);
*
log2_re
=
log2_approx
(
count
-
1
);
...
...
@@ -422,7 +431,8 @@ int nr_csi_rs_channel_estimation(const PHY_VARS_NR_UE *ue,
int
nr_csi_rs_ri_estimation
(
const
PHY_VARS_NR_UE
*
ue
,
const
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
,
const
nr_csi_rs_info_t
*
nr_csi_rs_info
,
int32_t
csi_rs_estimated_channel_freq
[][
ue
->
nr_csi_rs_info
->
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
const
uint8_t
N_ports
,
int32_t
csi_rs_estimated_channel_freq
[][
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
const
int16_t
log2_maxh
,
uint8_t
*
rank_indicator
)
{
...
...
@@ -431,11 +441,11 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue,
int
count
=
0
;
*
rank_indicator
=
0
;
if
(
ue
->
frame_parms
.
nb_antennas_rx
==
1
||
ue
->
nr_csi_rs_info
->
N_ports
==
1
)
{
if
(
ue
->
frame_parms
.
nb_antennas_rx
==
1
||
N_ports
==
1
)
{
return
0
;
}
else
if
(
!
(
ue
->
frame_parms
.
nb_antennas_rx
==
2
&&
ue
->
nr_csi_rs_info
->
N_ports
==
2
)
)
{
}
else
if
(
!
(
ue
->
frame_parms
.
nb_antennas_rx
==
2
&&
N_ports
==
2
)
)
{
LOG_W
(
NR_PHY
,
"Rank indicator computation is not implemented for %i x %i system
\n
"
,
ue
->
frame_parms
.
nb_antennas_rx
,
ue
->
nr_csi_rs_info
->
N_ports
);
ue
->
frame_parms
.
nb_antennas_rx
,
N_ports
);
return
-
1
;
}
...
...
@@ -444,9 +454,9 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue,
* | conjch01 conjch11 | | ch10 ch11 | | conjch01*ch00+conjch11*ch10 conjch01*ch01+conjch11*ch11 |
*/
int32_t
csi_rs_estimated_conjch_ch
[
frame_parms
->
nb_antennas_rx
][
nr_csi_rs_info
->
N_ports
][
frame_parms
->
nb_antennas_rx
][
nr_csi_rs_info
->
N_ports
][
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_A_MF
[
nr_csi_rs_info
->
N_ports
][
nr_csi_rs_info
->
N_ports
][
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_A_MF_sq
[
nr_csi_rs_info
->
N_ports
][
nr_csi_rs_info
->
N_ports
][
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_conjch_ch
[
frame_parms
->
nb_antennas_rx
][
N_ports
][
frame_parms
->
nb_antennas_rx
][
N_ports
][
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_A_MF
[
N_ports
][
N_ports
][
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_A_MF_sq
[
N_ports
][
N_ports
][
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_determ_fin
[
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
int32_t
csi_rs_estimated_numer_fin
[
frame_parms
->
ofdm_symbol_size
]
__attribute__
((
aligned
(
32
)));
...
...
@@ -460,9 +470,9 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue,
uint16_t
k
=
(
frame_parms
->
first_carrier_offset
+
rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
for
(
int
ant_rx_conjch
=
0
;
ant_rx_conjch
<
frame_parms
->
nb_antennas_rx
;
ant_rx_conjch
++
)
{
for
(
uint16_t
port_tx_conjch
=
0
;
port_tx_conjch
<
nr_csi_rs_info
->
N_ports
;
port_tx_conjch
++
)
{
for
(
uint16_t
port_tx_conjch
=
0
;
port_tx_conjch
<
N_ports
;
port_tx_conjch
++
)
{
for
(
int
ant_rx_ch
=
0
;
ant_rx_ch
<
frame_parms
->
nb_antennas_rx
;
ant_rx_ch
++
)
{
for
(
uint16_t
port_tx_ch
=
0
;
port_tx_ch
<
nr_csi_rs_info
->
N_ports
;
port_tx_ch
++
)
{
for
(
uint16_t
port_tx_ch
=
0
;
port_tx_ch
<
N_ports
;
port_tx_ch
++
)
{
// conjch x ch computation
nr_conjch0_mult_ch1
(
&
csi_rs_estimated_channel_freq
[
ant_rx_conjch
][
port_tx_conjch
][
k
],
...
...
@@ -503,8 +513,8 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue,
1
);
#ifdef NR_CSIRS_DEBUG
for
(
uint16_t
port_tx_conjch
=
0
;
port_tx_conjch
<
nr_csi_rs_info
->
N_ports
;
port_tx_conjch
++
)
{
for
(
uint16_t
port_tx_ch
=
0
;
port_tx_ch
<
nr_csi_rs_info
->
N_ports
;
port_tx_ch
++
)
{
for
(
uint16_t
port_tx_conjch
=
0
;
port_tx_conjch
<
N_ports
;
port_tx_conjch
++
)
{
for
(
uint16_t
port_tx_ch
=
0
;
port_tx_ch
<
N_ports
;
port_tx_ch
++
)
{
c16_t
*
csi_rs_estimated_A_MF_k
=
(
c16_t
*
)
&
csi_rs_estimated_A_MF
[
port_tx_conjch
][
port_tx_ch
][
k
];
LOG_I
(
NR_PHY
,
"(%i) csi_rs_estimated_A_MF[%i][%i] = (%i, %i)
\n
"
,
k
,
port_tx_conjch
,
port_tx_ch
,
csi_rs_estimated_A_MF_k
->
r
,
csi_rs_estimated_A_MF_k
->
i
);
...
...
@@ -553,7 +563,8 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue,
int
nr_csi_rs_pmi_estimation
(
const
PHY_VARS_NR_UE
*
ue
,
const
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
,
const
nr_csi_rs_info_t
*
nr_csi_rs_info
,
const
int32_t
csi_rs_estimated_channel_freq
[][
ue
->
nr_csi_rs_info
->
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
const
uint8_t
N_ports
,
const
int32_t
csi_rs_estimated_channel_freq
[][
N_ports
][
ue
->
frame_parms
.
ofdm_symbol_size
],
const
uint32_t
interference_plus_noise_power
,
const
uint8_t
rank_indicator
,
const
int16_t
log2_re
,
...
...
@@ -574,7 +585,7 @@ int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue,
// The first column is applicable if the UE is reporting a Rank = 1, whereas the second column is applicable if the
// UE is reporting a Rank = 2.
if
(
nr_csi_rs_info
->
N_ports
==
1
||
interference_plus_noise_power
==
0
)
{
if
(
N_ports
==
1
||
interference_plus_noise_power
==
0
)
{
return
0
;
}
...
...
@@ -812,6 +823,11 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
const
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int32_t
csi_rs_received_signal
[
frame_parms
->
nb_antennas_rx
][
frame_parms
->
samples_per_slot_wCP
];
uint8_t
N_cdm_groups
=
0
;
uint8_t
CDM_group_size
=
0
;
uint8_t
k_prime
=
0
;
uint8_t
l_prime
=
0
;
uint8_t
N_ports
=
0
;
int16_t
log2_re
=
0
;
int16_t
log2_maxh
=
0
;
uint32_t
noise_power
=
0
;
...
...
@@ -826,15 +842,24 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
AMP
,
ue
->
nr_csi_rs_info
,
(
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
)
csirs_config_pdu
,
proc
->
nr_slot_rx
);
proc
->
nr_slot_rx
,
&
N_cdm_groups
,
&
CDM_group_size
,
&
k_prime
,
&
l_prime
,
&
N_ports
);
int32_t
csi_rs_ls_estimated_channel
[
frame_parms
->
nb_antennas_rx
][
ue
->
nr_csi_rs_info
->
N_ports
][
frame_parms
->
ofdm_symbol_size
];
int32_t
csi_rs_estimated_channel_freq
[
frame_parms
->
nb_antennas_rx
][
ue
->
nr_csi_rs_info
->
N_ports
][
frame_parms
->
ofdm_symbol_size
];
int32_t
csi_rs_ls_estimated_channel
[
frame_parms
->
nb_antennas_rx
][
N_ports
][
frame_parms
->
ofdm_symbol_size
];
int32_t
csi_rs_estimated_channel_freq
[
frame_parms
->
nb_antennas_rx
][
N_ports
][
frame_parms
->
ofdm_symbol_size
];
nr_get_csi_rs_signal
(
ue
,
proc
,
csirs_config_pdu
,
ue
->
nr_csi_rs_info
,
N_cdm_groups
,
CDM_group_size
,
k_prime
,
l_prime
,
csi_rs_received_signal
);
nr_csi_rs_channel_estimation
(
ue
,
...
...
@@ -843,6 +868,11 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
ue
->
nr_csi_rs_info
,
(
const
int32_t
**
)
ue
->
nr_csi_rs_info
->
csi_rs_generated_signal
,
csi_rs_received_signal
,
N_cdm_groups
,
CDM_group_size
,
k_prime
,
l_prime
,
N_ports
,
csi_rs_ls_estimated_channel
,
csi_rs_estimated_channel_freq
,
&
log2_re
,
...
...
@@ -852,6 +882,7 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
nr_csi_rs_ri_estimation
(
ue
,
csirs_config_pdu
,
ue
->
nr_csi_rs_info
,
N_ports
,
csi_rs_estimated_channel_freq
,
log2_maxh
,
&
rank_indicator
);
...
...
@@ -859,6 +890,7 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
nr_csi_rs_pmi_estimation
(
ue
,
csirs_config_pdu
,
ue
->
nr_csi_rs_info
,
N_ports
,
csi_rs_estimated_channel_freq
,
ue
->
nr_csi_im_info
->
meas_computed
?
ue
->
nr_csi_im_info
->
interference_plus_noise_power
:
noise_power
,
rank_indicator
,
...
...
openair1/PHY/defs_nr_common.h
View file @
36a9139a
...
...
@@ -254,11 +254,6 @@ typedef struct {
}
nr_srs_info_t
;
typedef
struct
{
uint8_t
N_cdm_groups
;
uint8_t
CDM_group_size
;
uint8_t
kprime
;
uint8_t
lprime
;
uint8_t
N_ports
;
uint8_t
j
[
16
];
uint8_t
koverline
[
16
];
uint8_t
loverline
[
16
];
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
36a9139a
...
...
@@ -168,7 +168,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
if
(
csirs
->
active
==
1
)
{
LOG_D
(
PHY
,
"CSI-RS generation started in frame %d.%d
\n
"
,
frame
,
slot
);
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
=
&
csirs
->
csirs_pdu
.
csi_rs_pdu_rel15
;
nr_generate_csi_rs
(
&
gNB
->
frame_parms
,
gNB
->
common_vars
.
txdataF
,
AMP
,
gNB
->
nr_csi_rs_info
,
csi_params
,
slot
);
nr_generate_csi_rs
(
&
gNB
->
frame_parms
,
gNB
->
common_vars
.
txdataF
,
AMP
,
gNB
->
nr_csi_rs_info
,
csi_params
,
slot
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
csirs
->
active
=
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