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
19d8ea27
Commit
19d8ea27
authored
Mar 09, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor optimizations
parent
51a72b84
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
54 deletions
+76
-54
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+70
-7
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+1
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+5
-47
No files found.
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
19d8ea27
...
@@ -41,8 +41,57 @@
...
@@ -41,8 +41,57 @@
//#define NR_CSIRS_DEBUG
//#define NR_CSIRS_DEBUG
bool
is_csi_rs_in_symbol
(
fapi_nr_dl_config_csirs_pdu_rel15_t
csirs_config_pdu
,
int
symbol
)
{
bool
ret
=
false
;
// 38.211-Table 7.4.1.5.3-1: CSI-RS locations within a slot
switch
(
csirs_config_pdu
.
row
){
case
1
:
case
2
:
case
3
:
case
4
:
case
6
:
case
9
:
if
(
symbol
==
csirs_config_pdu
.
symb_l0
)
{
ret
=
true
;
}
break
;
case
5
:
case
7
:
case
8
:
case
10
:
case
11
:
case
12
:
if
(
symbol
==
csirs_config_pdu
.
symb_l0
||
symbol
==
(
csirs_config_pdu
.
symb_l0
+
1
)
)
{
ret
=
true
;
}
break
;
case
13
:
case
14
:
case
16
:
case
17
:
if
(
symbol
==
csirs_config_pdu
.
symb_l0
||
symbol
==
(
csirs_config_pdu
.
symb_l0
+
1
)
||
symbol
==
csirs_config_pdu
.
symb_l1
||
symbol
==
(
csirs_config_pdu
.
symb_l1
+
1
))
{
ret
=
true
;
}
break
;
case
15
:
case
18
:
if
(
symbol
==
csirs_config_pdu
.
symb_l0
||
symbol
==
(
csirs_config_pdu
.
symb_l0
+
1
)
||
symbol
==
(
csirs_config_pdu
.
symb_l0
+
2
)
)
{
ret
=
true
;
}
break
;
default:
AssertFatal
(
0
==
1
,
"Row %d is not valid for CSI Table 7.4.1.5.3-1
\n
"
,
csirs_config_pdu
.
row
);
}
return
ret
;
}
int
nr_get_csi_rs_signal
(
PHY_VARS_NR_UE
*
ue
,
int
nr_get_csi_rs_signal
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
int32_t
**
csi_rs_received_signal
)
{
int32_t
**
csi_rs_received_signal
)
{
...
@@ -52,6 +101,9 @@ int nr_get_csi_rs_signal(PHY_VARS_NR_UE *ue,
...
@@ -52,6 +101,9 @@ int nr_get_csi_rs_signal(PHY_VARS_NR_UE *ue,
for
(
int
ant
=
0
;
ant
<
frame_parms
->
nb_antennas_rx
;
ant
++
)
{
for
(
int
ant
=
0
;
ant
<
frame_parms
->
nb_antennas_rx
;
ant
++
)
{
memset
(
csi_rs_received_signal
[
ant
],
0
,
frame_parms
->
samples_per_frame_wCP
*
sizeof
(
int32_t
));
memset
(
csi_rs_received_signal
[
ant
],
0
,
frame_parms
->
samples_per_frame_wCP
*
sizeof
(
int32_t
));
for
(
int
symb
=
0
;
symb
<
NR_SYMBOLS_PER_SLOT
;
symb
++
)
{
for
(
int
symb
=
0
;
symb
<
NR_SYMBOLS_PER_SLOT
;
symb
++
)
{
if
(
!
is_csi_rs_in_symbol
(
*
csirs_config_pdu
,
symb
))
{
continue
;
}
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
int16_t
*
rx_signal
=
(
int16_t
*
)
&
rxdataF
[
ant
][
symbol_offset
];
int16_t
*
rx_signal
=
(
int16_t
*
)
&
rxdataF
[
ant
][
symbol_offset
];
int16_t
*
rx_csi_rs_signal
=
(
int16_t
*
)
&
csi_rs_received_signal
[
ant
][
symbol_offset
];
int16_t
*
rx_csi_rs_signal
=
(
int16_t
*
)
&
csi_rs_received_signal
[
ant
][
symbol_offset
];
...
@@ -80,6 +132,7 @@ int nr_get_csi_rs_signal(PHY_VARS_NR_UE *ue,
...
@@ -80,6 +132,7 @@ int nr_get_csi_rs_signal(PHY_VARS_NR_UE *ue,
int
nr_csi_rs_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_csi_rs_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
int32_t
**
csi_rs_generated_signal
,
int32_t
**
csi_rs_generated_signal
,
int32_t
**
csi_rs_received_signal
,
int32_t
**
csi_rs_received_signal
,
...
@@ -88,19 +141,24 @@ int nr_csi_rs_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -88,19 +141,24 @@ int nr_csi_rs_channel_estimation(PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
dataF_offset
=
proc
->
nr_slot_rx
*
ue
->
frame_parms
.
samples_per_slot_wCP
;
int
dataF_offset
=
proc
->
nr_slot_rx
*
ue
->
frame_parms
.
samples_per_slot_wCP
;
int16_t
ls_estimated
[
2
];
for
(
int
ant
=
0
;
ant
<
frame_parms
->
nb_antennas_rx
;
ant
++
)
{
for
(
int
ant
=
0
;
ant
<
frame_parms
->
nb_antennas_rx
;
ant
++
)
{
for
(
int
symb
=
0
;
symb
<
NR_SYMBOLS_PER_SLOT
;
symb
++
)
{
/// LS channel estimation
for
(
int
symb
=
0
;
symb
<
NR_SYMBOLS_PER_SLOT
;
symb
++
)
{
if
(
!
is_csi_rs_in_symbol
(
*
csirs_config_pdu
,
symb
))
{
continue
;
}
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
int16_t
*
tx_csi_rs_signal
=
(
int16_t
*
)
&
nr_csi_rs_info
->
csi_rs_generated_signal
[
ant
][
symbol_offset
+
dataF_offset
];
int16_t
*
tx_csi_rs_signal
=
(
int16_t
*
)
&
nr_csi_rs_info
->
csi_rs_generated_signal
[
ant
][
symbol_offset
+
dataF_offset
];
int16_t
*
rx_csi_rs_signal
=
(
int16_t
*
)
&
csi_rs_received_signal
[
ant
][
symbol_offset
];
int16_t
*
rx_csi_rs_signal
=
(
int16_t
*
)
&
csi_rs_received_signal
[
ant
][
symbol_offset
];
int16_t
*
csi_rs_ls_estimated_channel
=
(
int16_t
*
)
&
nr_csi_rs_info
->
csi_rs_ls_estimated_channel
[
ant
][
symbol_offset
];
for
(
int
k_id
=
0
;
k_id
<
nr_csi_rs_info
->
k_list_length
[
symb
];
k_id
++
)
{
for
(
int
k_id
=
0
;
k_id
<
nr_csi_rs_info
->
k_list_length
[
symb
];
k_id
++
)
{
uint16_t
k
=
nr_csi_rs_info
->
map_list
[
symb
][
k_id
];
uint16_t
k
=
nr_csi_rs_info
->
map_list
[
symb
][
k_id
];
ls_estimated
[
0
]
=
(
int16_t
)(((
int32_t
)
tx_csi_rs_signal
[
k
<<
1
]
*
rx_csi_rs_signal
[
k
<<
1
]
+
(
int32_t
)
tx_csi_rs_signal
[(
k
<<
1
)
+
1
]
*
rx_csi_rs_signal
[(
k
<<
1
)
+
1
])
>>
nr_csi_rs_info
->
csi_rs_generated_signal_bits
);
csi_rs_ls_estimated_channel
[
k
<<
1
]
=
(
int16_t
)(((
int32_t
)
tx_csi_rs_signal
[
k
<<
1
]
*
rx_csi_rs_signal
[
k
<<
1
]
+
(
int32_t
)
tx_csi_rs_signal
[(
k
<<
1
)
+
1
]
*
rx_csi_rs_signal
[(
k
<<
1
)
+
1
])
>>
nr_csi_rs_info
->
csi_rs_generated_signal_bits
);
ls_estimated
[
1
]
=
(
int16_t
)(((
int32_t
)
tx_csi_rs_signal
[
k
<<
1
]
*
rx_csi_rs_signal
[(
k
<<
1
)
+
1
]
-
(
int32_t
)
tx_csi_rs_signal
[(
k
<<
1
)
+
1
]
*
rx_csi_rs_signal
[
k
<<
1
])
>>
nr_csi_rs_info
->
csi_rs_generated_signal_bits
);
csi_rs_ls_estimated_channel
[(
k
<<
1
)
+
1
]
=
(
int16_t
)(((
int32_t
)
tx_csi_rs_signal
[
k
<<
1
]
*
rx_csi_rs_signal
[(
k
<<
1
)
+
1
]
-
(
int32_t
)
tx_csi_rs_signal
[(
k
<<
1
)
+
1
]
*
rx_csi_rs_signal
[
k
<<
1
])
>>
nr_csi_rs_info
->
csi_rs_generated_signal_bits
);
#ifdef NR_CSIRS_DEBUG
#ifdef NR_CSIRS_DEBUG
LOG_I
(
NR_PHY
,
"l,k (%2d,%3d) |
\t
tx (%4d,%4d)
\t
rx (%4d,%4d)
\t
ls (%4d,%4d)
\n
"
,
LOG_I
(
NR_PHY
,
"l,k (%2d,%3d) |
\t
tx (%4d,%4d)
\t
rx (%4d,%4d)
\t
ls (%4d,%4d)
\n
"
,
...
@@ -110,8 +168,8 @@ int nr_csi_rs_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -110,8 +168,8 @@ int nr_csi_rs_channel_estimation(PHY_VARS_NR_UE *ue,
tx_csi_rs_signal
[(
k
<<
1
)
+
1
],
tx_csi_rs_signal
[(
k
<<
1
)
+
1
],
rx_csi_rs_signal
[
k
<<
1
],
rx_csi_rs_signal
[
k
<<
1
],
rx_csi_rs_signal
[(
k
<<
1
)
+
1
],
rx_csi_rs_signal
[(
k
<<
1
)
+
1
],
ls_estimated
[
0
],
csi_rs_ls_estimated_channel
[
k
<<
1
],
ls_estimated
[
1
]);
csi_rs_ls_estimated_channel
[(
k
<<
1
)
+
1
]);
#endif
#endif
}
}
}
}
...
@@ -157,10 +215,15 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
...
@@ -157,10 +215,15 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
ue
->
frame_parms
.
first_carrier_offset
,
ue
->
frame_parms
.
first_carrier_offset
,
proc
->
nr_slot_rx
);
proc
->
nr_slot_rx
);
nr_get_csi_rs_signal
(
ue
,
proc
,
ue
->
nr_csi_rs_info
,
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
);
nr_get_csi_rs_signal
(
ue
,
proc
,
csirs_config_pdu
,
ue
->
nr_csi_rs_info
,
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
);
nr_csi_rs_channel_estimation
(
ue
,
nr_csi_rs_channel_estimation
(
ue
,
proc
,
proc
,
csirs_config_pdu
,
ue
->
nr_csi_rs_info
,
ue
->
nr_csi_rs_info
,
ue
->
nr_csi_rs_info
->
csi_rs_generated_signal
,
ue
->
nr_csi_rs_info
->
csi_rs_generated_signal
,
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
,
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
,
...
...
openair1/SCHED_NR_UE/defs.h
View file @
19d8ea27
...
@@ -366,6 +366,7 @@ int get_tx_harq_id(NR_UE_ULSCH_t *ulsch, int slot_tx);
...
@@ -366,6 +366,7 @@ int get_tx_harq_id(NR_UE_ULSCH_t *ulsch, int slot_tx);
int
is_pbch_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
int
is_pbch_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
int
is_ssb_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
int
is_ssb_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
);
bool
is_csi_rs_in_symbol
(
fapi_nr_dl_config_csirs_pdu_rel15_t
csirs_config_pdu
,
int
symbol
);
/*! \brief This function prepares the dl indication to pass to the MAC
/*! \brief This function prepares the dl indication to pass to the MAC
@param
@param
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
19d8ea27
...
@@ -1356,52 +1356,6 @@ int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL
...
@@ -1356,52 +1356,6 @@ int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL
}
}
}
}
void
nr_slot_fep_csi_rs
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
fapi_nr_dl_config_csirs_pdu_rel15_t
csirs_config_pdu
,
int
slot
)
{
// 38.211-Table 7.4.1.5.3-1: CSI-RS locations within a slot
switch
(
csirs_config_pdu
.
row
){
case
1
:
case
2
:
case
3
:
case
4
:
case
6
:
case
9
:
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
,
slot
);
break
;
case
5
:
case
7
:
case
8
:
case
10
:
case
11
:
case
12
:
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
,
slot
);
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
+
1
,
slot
);
break
;
case
13
:
case
14
:
case
16
:
case
17
:
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
,
slot
);
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
+
1
,
slot
);
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l1
,
slot
);
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l1
+
1
,
slot
);
break
;
case
15
:
case
18
:
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
,
slot
);
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
+
1
,
slot
);
nr_slot_fep
(
ue
,
proc
,
csirs_config_pdu
.
symb_l0
+
2
,
slot
);
break
;
default:
AssertFatal
(
0
==
1
,
"Row %d is not valid for CSI Table 7.4.1.5.3-1
\n
"
,
csirs_config_pdu
.
row
);
}
}
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
...
@@ -1694,7 +1648,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -1694,7 +1648,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
// do procedures for CSI-RS
// do procedures for CSI-RS
if
((
ue
->
csirs_vars
[
gNB_id
])
&&
(
ue
->
csirs_vars
[
gNB_id
]
->
active
==
1
))
{
if
((
ue
->
csirs_vars
[
gNB_id
])
&&
(
ue
->
csirs_vars
[
gNB_id
]
->
active
==
1
))
{
nr_slot_fep_csi_rs
(
ue
,
proc
,
ue
->
csirs_vars
[
gNB_id
]
->
csirs_config_pdu
,
nr_slot_rx
);
for
(
int
symb
=
0
;
symb
<
NR_SYMBOLS_PER_SLOT
;
symb
++
)
{
if
(
is_csi_rs_in_symbol
(
ue
->
csirs_vars
[
gNB_id
]
->
csirs_config_pdu
,
symb
))
{
nr_slot_fep
(
ue
,
proc
,
symb
,
nr_slot_rx
);
}
}
nr_ue_csi_rs_procedures
(
ue
,
proc
,
gNB_id
);
nr_ue_csi_rs_procedures
(
ue
,
proc
,
gNB_id
);
ue
->
csirs_vars
[
gNB_id
]
->
active
=
0
;
ue
->
csirs_vars
[
gNB_id
]
->
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