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
Michael Black
OpenXG-RAN
Commits
00ff5e8a
Commit
00ff5e8a
authored
Mar 03, 2020
by
adk
Committed by
Thomas Schlichter
Mar 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PUSCH PTRS extraction and fixing nr_ulsim
parent
505d06e9
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
153 additions
and
61 deletions
+153
-61
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+31
-23
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+6
-8
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+97
-26
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+14
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+3
-3
No files found.
openair1/PHY/INIT/nr_init.c
View file @
00ff5e8a
...
...
@@ -170,7 +170,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
gNB
->
pusch_config
.
pusch_TimeDomainResourceAllocation
[
i
]
->
mappingType
=
typeB
;
}
gNB
->
ptrs_configured
=
0
;
gNB
->
ptrs_configured
=
1
;
//------------- config PUSCH PTRS parameters(to be updated from RRC)--------------//
ptrs_Uplink_Config
->
timeDensity
.
ptrs_mcs1
=
0
;
// setting MCS values to 0 indicate abscence of time_density field in the configuration
...
...
@@ -234,32 +234,36 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
for
(
int
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
//FIXME
pusch_vars
[
UE_id
]
=
(
NR_gNB_PUSCH
*
)
malloc16_clear
(
sizeof
(
NR_gNB_PUSCH
)
);
pusch_vars
[
UE_id
]
->
rxdataF_ext
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rxdataF_ext2
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_time
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rxdataF_comp
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_mag0
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_magb0
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_mag
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_magb
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rho
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rxdataF_ext
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rxdataF_ext2
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates_ext
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_time
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rxdataF_comp
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_mag0
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_magb0
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_mag
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
ul_ch_magb
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
pusch_vars
[
UE_id
]
->
rho
=
(
int32_t
**
)
malloc16_clear
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
// RK 2 times because of output format of FFT!
// FIXME We should get rid of this
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
rxdataF_ext2
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
);
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_mag0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
ul_ch_magb0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
ul_ch_mag
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
ul_ch_magb
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
rho
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
N_RB_UL
*
12
*
7
*
2
)
);
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
rxdataF_ext2
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
2
*
fp
->
symbols_per_slot
);
// max intensity in freq is 1 sc every 2 RBs
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
2
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
);
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
*
fp
->
symbols_per_slot
);
pusch_vars
[
UE_id
]
->
ul_ch_mag0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
ul_ch_magb0
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
ul_ch_mag
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
ul_ch_magb
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
symbols_per_slot
*
sizeof
(
int32_t
)
*
cfg
->
rf_config
.
ul_carrier_bandwidth
.
value
*
12
);
pusch_vars
[
UE_id
]
->
rho
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
(
fp
->
N_RB_UL
*
12
*
7
*
2
)
);
}
pusch_vars
[
UE_id
]
->
llr
=
(
int16_t
*
)
malloc16_clear
(
(
8
*
((
3
*
8
*
6144
)
+
12
))
*
sizeof
(
int16_t
)
);
// [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear
...
...
@@ -363,6 +367,8 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero
(
pusch_vars
[
UE_id
]
->
rxdataF_ext2
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_estimates
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates_ext
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_estimates_time
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
i
]);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_mag0
[
i
]);
...
...
@@ -376,6 +382,8 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero
(
pusch_vars
[
UE_id
]
->
rxdataF_ext2
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_estimates
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_ptrs_estimates_ext
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_estimates_time
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
rxdataF_comp
);
free_and_zero
(
pusch_vars
[
UE_id
]
->
ul_ch_mag0
);
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
00ff5e8a
...
...
@@ -748,7 +748,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
/////////////////////////PUSCH PTRS init/////////////////////////
///////////
ue
->
ptrs_configured
=
0
;
// flag to be toggled by RCC
ue
->
ptrs_configured
=
1
;
// flag to be toggled by RCC
//------------- config PTRS parameters--------------//
ptrs_Uplink_Config
->
timeDensity
.
ptrs_mcs1
=
0
;
// setting MCS values to 0 indicate abscence of time_density field in the configuration
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
00ff5e8a
...
...
@@ -65,20 +65,18 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
@param is_dmrs_symbol, flag to indicate wether this OFDM symbol contains DMRS symbols or not.
*/
void
nr_ulsch_extract_rbs_single
(
int
**
rxdataF
,
int
**
ul_ch_estimates
,
int
**
rxdataF_ext
,
int
**
ul_ch_estimates_ext
,
uint32_t
rxdataF_ext_offset
,
// unsigned int *rb_alloc, [hna] Resource Allocation Type 1 is assumed only for the moment
void
nr_ulsch_extract_rbs_single
(
int32_t
**
rxdataF
,
NR_gNB_PUSCH
*
pusch_vars
,
unsigned
char
symbol
,
unsigned
short
start_rb
,
unsigned
short
nb_rb_pusch
,
uint16_t
n_rnti
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
dmrs_symbol
,
uint16_t
number_symbols
,
uint8_t
mapping_type
,
dmrs_UplinkConfig_t
*
dmrs_UplinkConfig
);
uint8_t
ptrs_configured
,
dmrs_UplinkConfig_t
*
dmrs_UplinkConfig
,
ptrs_UplinkConfig_t
*
ptrs_Uplink_Config
);
void
nr_ulsch_scale_channel
(
int32_t
**
ul_ch_estimates_ext
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
00ff5e8a
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
00ff5e8a
...
...
@@ -546,6 +546,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
frame_parms
);
}
}
///////////
////////////////////////////////////////////////////
return
0
;
...
...
openair1/PHY/defs_gNB.h
View file @
00ff5e8a
...
...
@@ -375,6 +375,14 @@ typedef struct {
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
ul_ch_estimates_ext
;
/// \brief Hold the PTRS phase estimates in frequency domain.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
ul_ch_ptrs_estimates
;
/// \brief Uplink phase estimates extracted in PRBS.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t
**
ul_ch_ptrs_estimates_ext
;
/// \brief Holds the compensated signal.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
...
...
@@ -416,6 +424,12 @@ typedef struct {
int16_t
*
llr
;
// DMRS symbol index, to be updated every DMRS symbol within a slot.
uint8_t
dmrs_symbol
;
// PTRS symbol index, to be updated every PTRS symbol within a slot.
uint8_t
ptrs_symbol_index
;
/// bit mask of PT-RS ofdm symbol indicies
uint16_t
ptrs_symbols
;
// PTRS subcarriers per OFDM symbol
uint16_t
ptrs_sc_per_ofdm_symbol
;
}
NR_gNB_PUSCH
;
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
00ff5e8a
...
...
@@ -428,7 +428,7 @@ int main(int argc, char **argv)
uint16_t
number_dmrs_symbols
=
0
;
unsigned
int
available_bits
;
uint8_t
nb_re_dmrs
;
uint8_t
length_dmrs
=
UE
->
dmrs_UplinkConfig
.
pusch_maxLength
;
uint8_t
length_dmrs
=
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_maxLength
;
unsigned
char
mod_order
;
uint16_t
code_rate
;
...
...
@@ -440,12 +440,12 @@ int main(int argc, char **argv)
0
,
0
,
nb_symb_sch
,
&
UE
->
dmrs_UplinkConfig
,
&
UE
->
pusch_config
.
dmrs_UplinkConfig
,
UE
->
pusch_config
.
pusch_TimeDomainResourceAllocation
[
0
]
->
mappingType
,
frame_parms
->
ofdm_symbol_size
);
mod_order
=
nr_get_Qm_ul
(
Imcs
,
0
);
nb_re_dmrs
=
((
UE
->
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
nb_re_dmrs
=
((
UE
->
pusch_config
.
dmrs_UplinkConfig
.
pusch_dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
;
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
0
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
TBS
=
nr_compute_tbs
(
mod_order
,
code_rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
precod_nbr_layers
);
...
...
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