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
wangwenhui
OpenXG-RAN
Commits
734646bc
Commit
734646bc
authored
7 years ago
by
Hongzhi Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nr_pdcch_ue' into develop-nr
parents
b2e49fd0
ecc7f66e
develop
1
128-ues
256_QAM_demod
375-syrtem-sdr-platform
408-reworked
408-ue-main-threads
445-LDPC-implementation-on-GPU
459-pusch-based-ta-updates
464-ru_beamforming_in_gpu
464-ru_beamforming_in_gpu-CPUsubfunction
472-add-pusch-dmrs-modes
481-ldpc-decoder-on-gpu
5g_fapi_scf
LTE_TRX_on_single_port
NCTU_CS_ISIP
NCTU_CS_ISIP_CPU
NCTU_CS_ISIP_GPU
NCTU_OpinConnect_LDPC
NR-PHY-MAC-IF-multi-UE
NR_10MHz
NR_CSI_reporting
NR_DCI_01
NR_DLUL_PF
NR_DLUL_PF_rebased
NR_DL_sched_fixes
NR_DL_scheduler
NR_FAPI_beamindex_SSB_RO
NR_FR2_RA
NR_FR2_RRC_SSB
NR_MAC_CE_GlobalEdge
NR_MAC_Multi_Rach_GlobalEdge
NR_MAC_SSB_RO_GlobalEdge
NR_MAC_SSB_RO_UE_IDCC
NR_MAC_SSB_RO_merge
NR_MAC_TCI_UCI_GlobalEdge
NR_NGAP
NR_PDCP_noS1
NR_PUCCH_MultiUE
NR_RA_updates
NR_RRCConfiguragion_FR2
NR_RRCConfiguration
NR_RRCConfiguration_FR2
NR_RRCConfiguration_S1U
NR_RRCConfiguration_merge_develop
NR_RRCConfiguration_sync_source
NR_RRCConfiguration_trx_thread
NR_RRC_CP_bugfix
NR_RRC_PDCP
NR_RRC_PRACH_procedures
NR_RRC_PRACH_procedures_todevelop
NR_RRC_PUSCH
NR_RRC_TA
NR_RRC_X2AP_AMBR_Change_Global_edge
NR_RRC_X2AP_RemoveHardcodings_GlobalEdge
NR_RRC_config_simplified
NR_RRC_harq
NR_RRC_harq_b
NR_RRC_harq_hacks
NR_RRC_harq_newdcipdu
NR_SA_F1AP_dev
NR_SA_NGAP_RRC
NR_SA_NGAP_RRC_wk42
NR_SA_itti_sim_wk48
NR_SA_itti_sim_wk48_hs
NR_SA_itti_sim_wk48_hs1
NR_SCHED
NR_SCHED_HARQ
NR_SCHED_PDCCH_PUCCH_HARQ
NR_SCHED_PDCCH_PUCCH_HARQ_rebased
NR_SCHED_fixes
NR_SRB_Config
NR_TRX_on_single_port
NR_TRX_on_single_port2
NR_UE_MAC_scheduler
NR_UE_RA_fixes
NR_UE_UL_DCI_improvements
NR_UE_dlsch_bugfix
NR_UE_enable_parallelization
NR_UE_stability_fixes
NR_UL_FAPI_programming
NR_UL_scheduler
NR_UL_scheduler_rebased
NR_UL_scheduling
NR_beam_simulation
NR_beamforming_test
NR_gNB_SCF_Indication
NR_ipaccess_testing
NR_mac_uci_functions_rework
NR_msg2_phytest
NR_scheduling_CSIRS
NR_scheduling_request
NR_scheduling_request2
NR_test_S1U_RRC_PRACH_procedures
NR_ue_dlsch_dmrs_cdm
OpInConnect_ISIP
PUSCH_TA_update
RA_CI_test
UE_DL_DCI_hotfix
addoptions_nr_USRPdevice
bch-fixes-bitmap
benetel_5g_prach_fix
benetel_driver_update
benetel_phase_rotation
benetel_phase_rotation_old
bugfix-minor-remove-wrong-log
bugfix-nr-bands
bugfix-nr-ldpc-post-processing
bugfix-nr-ldpc-size-typo
bugfix-nr-pdcp-sn-size
bugfix-nr-rate-matching-assertion
cce_indexing_fix
cce_indexing_fix2
ci-deploy-asterix
ci-deploy-docker-compose
ci-rd-july-improvements
ci-test
ci-ul-iperf-from-trf-container
clean-5G-scope-round2
cleanup_softmodem_main
constant_power
debug_branch_init_sync
develop-SnT
develop-ci
develop-nr
develop-nr-adding-2018-09-asn1
develop-nr-fr2
develop-nr-fr2-rework
develop-nr_cppcheck
develop-oriecpriupdates
develop-sib1
develop-sib1-local
develop-sib1-lts
develop_inria_ci_deployment
develop_inria_ci_deployment_gp
develop_integration_2020_w15
develop_integration_2020_w19
develop_integration_w08
develop_stable
dfts_alternatives
dlsch-all-dlslots
dlsch_encode_mthread
dlsch_parallel
docupdate_tools
dongzhanyi-zte-develop
dongzhanyi-zte-develop2
dreibh/apt-auth-fix
dreibh/device-load-fix
dreibh/device-load-fix-develop-branch
dual-connectivity
edrx
extend_sharedlibusage
extend_sharedlibusage2
fapi_for_dmrs_and_ptrs
feat-mac-sock
feature-4g-sched
feature-nr-4g-nfapi-modifications
feature-support-clang-format
feature/make-s1-mme-port-configurable
feature/make-s1-mme-port-configurable-with-astyle-fixes
fembms-enb-ue
finalize-oaicn-integration
firas
fix-ci-tun
fix-clock-source
fix-itti-segv
fix-l2-sim
fix-limeSDR-compile
fix-softmodem-restart
fix-warnings
fix_NR_DLUL_PF
fix_do_ra_data
fix_pdsch_low_prb
fix_rfsim_mimo
fix_rrc_x2_ticking
fixes-CE-RLC-PDU-size
fixes-mac-sched-nfapi
fixes-mac-sched-tun
fixes-tun
flexran-apps
flexran-improvements
flexran-repair-mme-mgmt
fr2-hw-test
fujitsu_lte_contribution
fujitsu_lte_contribution-128
gNB-nrUE-USRP
generate_push_ptrs
gnb-only-test
harq-hotfix
hotfix-minor-remove-nr-rlc-cppcheck-error
hotfix-nr-rlc-tick
hotfix-ocp-executable
hotfix-ue-musim-compilation
hotfix_usrp_lib
improve_build_nr_lte_merge
improve_nr_modulation
improve_ue_stability
integration-develop-nr-2019w45
integration_2020_wk40
integration_2020_wk41
integration_2020_wk42_2
integration_2020_wk45
integration_2020_wk45_2
integration_2020_wk46
integration_2020_wk46_2
integration_2020_wk47
integration_2020_wk48
integration_2020_wk48_2
integration_2020_wk49
integration_2020_wk50
integration_2020_wk50_1
integration_2020_wk51
integration_2020_wk51_2
integration_2021_wk02
integration_2021_wk02_wMR988
inter-RRU-final
inter-RRU-nr
inter-RRU-oairu
inter-rru-UE
interoperability-test
isip_nr
itti-enhancement
l2-fixes
ldpc-dec-layering
ldpc-decoder-codegen
ldpc-decoder-codegen2
ldpc-decoder-improvements
ldpc-offload
ldpc_short_codeword_fixes
load_gnb
lte_uplink_improvement
mac-fixes-wk45_2
mbms-fix-develop-nr
merging-2019-w51-to-develop-nr
minor-fix-doc-basic-sim
mosaic5g-oai-ran
mosaic5g-oai-sim
nasmesh_kernel_5.8
new_rlc_2020
nfapi-bugfix
nfapi_nr_develop
ngap-dlul
ngap-support
ngap-w48-merge2
ngap-wf
ngap-wf-1120
ngap-wf-1120-srb
ngap-wf-1120-srb-gtp
ngap-wf-1120-srb-gtp-hs
ngap-wf-1120-srb-gtp-hs1
ngap-wf-1120-srb-gtp-hs2
ngap-wf-1120-srb-gtp-yhz
ngap-wf-1203-yunsdr
ngap-wf-liuyu
ngap_lfq_1120
ngap_merge
noCore
nr-coreset-bug-fix
nr-dlsch-multi-thread
nr-dlsch-thread
nr-dual-connectivity
nr-interdigital-test
nr-ip-uplink-noS1
nr-mac-pdu-wireshark
nr-mac-remove-ue-list
nr-multiple-ssb
nr-pdcp
nr-pdsch-extraction-bugfix
nr-physim-update
nr-rlc-am-bugfix-w44
nr-rlc-bugfix-w44
nr-ssb-measurements
nr-timing-measurement
nr-timing-measurement-merge
nr-ue-buffer-status
nr-ue-slot-based
nr-uldci
nrUE
nrUE-hs
nrUE-upper-layer
nr_beamforming
nr_bsr
nr_ci_dlsim
nr_csi_newbranch
nr_dci_procedures
nr_demo_wsa2019
nr_dl_dmrs_type2
nr_dl_pf
nr_dl_pf2
nr_dl_ul_ptrs
nr_dlsch_parallel_measurements
nr_dlsim_plot
nr_fapi_for_push_tmp
nr_fdd_if_fix
nr_fix_easycppcheck
nr_flexible_NRBDL
nr_improve_build_procedures
nr_increase_tp
nr_mib_vsa_test
nr_pdcch_testing
nr_pdcch_updates
nr_pdsch_integration
nr_polar_decoder_improvement
nr_prach
nr_prach_fr2
nr_pucch
nr_pucch2
nr_segmentation_fixes
nr_sim_fix
nr_tdd_configuration
nr_ue_msg3
nr_ue_tti_cleanup
nr_ul_pf
nr_ul_scfdma
nr_vcd
nrue-multi-thread
nrue_msg2_reception
nsa-ue
nsa_remove_band_hardcodings
oai-sim
oai-ubuntu-docker
oai-ubuntu-docker-for-lmssdr
oairu
oc-docker-october-improvements
openxg/develop
pdcp-benchmark
pdsch-ch-est
polar8
ptrs_rrc_config
pusch-mthread-scaling-fix
pusch-retrans-fix-ue
ra-dl-ul
reduce_memory_footprint
remove-ci-workaround
remove_nos1_hack_pdcp
remove_x2_gnb_hardcoding
repair-TA
revert-f5c94279
revert_memcpy
rh-ci-add-ue-parallelization
rh_ci_fix_autoterminate
rh_ci_fr1_update
rh_ci_oc
rh_ci_py
rh_ci_rfsim_ra
rh_doc_update_3
rh_fr1_newjenkins
rh_fr1_update
rh_gnb_compile_fix
rh_wk50_debug
rlc-v2-bugfix-status-reporting
rlc-v2-tick
rlc_v2_coverity_fixes
rrc-enb-phy-testmode
ru-parallel-beamforming
runel
runel-reverse-test
s1-subnormal_rewrite
s1_subnormal
s1_subnormal-robert
s1ap-bugfix-rab_setup
sa-demo
sa-merge-rrc-srb
sa-msg4
sa-msg4-rrc
sa-msg4-rrc-yihz
sa-msg4-rrc-yihz-hs
sa_rrc_yihz
small-bugfixes-w40
small-config-change
smallcleanup
softmodem_cleanup
split73
test-x310-perf
testing_2symb_pdcch
testing_with_external_txdata
thread-pool
tools_5Gadapt
tp-ota-test
trx_thread_param
trx_write_thread
ue-csi
ue-fixes-ota
ue-updates-runel-test
ue_adjust_gain
ue_beam_selection
ue_dlsch-multi-threading
ue_dlsch_decoding_ldpc_offload
ue_nfapi_mch
uhd_priority_set_cleanup
ul-freq-iq-samps-to-file
ul_dl_dci_same_slot
ul_harq
ulsch_decode_mthread
ulsim_changes
update-to-2019-march-june-release
usrp_fix_adc_shift_and_pps_sync
usrp_gpio_test
wireshark-log-scheduling-requests
x2-endc-processing
xiangwab
xiangwan
yihongzheng_srb
zzs
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
osa-etsi-ws-ue
osa-etsi-ws-try2
osa-etsi-ws-try1
osa-etsi-ws-gNB
nr-ip-over-lte
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
develop-nr-pdcch
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
develop-nr-2019w28
develop-nr-2019w23
benetel_phase_rotation
No related merge requests found
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
648 additions
and
48 deletions
+648
-48
openair1/PHY/MODULATION/modulation_UE.h
openair1/PHY/MODULATION/modulation_UE.h
+3
-2
openair1/PHY/MODULATION/slot_fep.c
openair1/PHY/MODULATION/slot_fep.c
+69
-3
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
+62
-9
openair1/PHY/NR_REFSIG/nr_gold_ue.c
openair1/PHY/NR_REFSIG/nr_gold_ue.c
+47
-4
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
+20
-4
openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h
openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h
+25
-0
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+361
-0
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+17
-5
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+5
-6
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+9
-6
openair1/PHY/NR_UE_TRANSPORT/sss_nr.c
openair1/PHY/NR_UE_TRANSPORT/sss_nr.c
+6
-4
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+8
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+15
-3
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+1
-1
No files found.
openair1/PHY/MODULATION/modulation_UE.h
View file @
734646bc
...
@@ -48,12 +48,13 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
...
@@ -48,12 +48,13 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
int
no_prefix
,
int
no_prefix
,
int
reset_freq_est
);
int
reset_freq_est
);
int
slot_fep_pbch
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
int
nr_slot_fep
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
unsigned
char
l
,
unsigned
char
l
,
unsigned
char
Ns
,
unsigned
char
Ns
,
int
sample_offset
,
int
sample_offset
,
int
no_prefix
,
int
no_prefix
,
int
reset_freq_est
);
int
reset_freq_est
,
NR_CHANNEL_EST_t
channel
);
int
slot_fep_mbsfn
(
PHY_VARS_UE
*
phy_vars_ue
,
int
slot_fep_mbsfn
(
PHY_VARS_UE
*
phy_vars_ue
,
unsigned
char
l
,
unsigned
char
l
,
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/slot_fep.c
View file @
734646bc
...
@@ -23,17 +23,19 @@
...
@@ -23,17 +23,19 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "modulation_UE.h"
#include "modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
//#define DEBUG_FEP
//#define DEBUG_FEP
#define SOFFSET 0
#define SOFFSET 0
int
slot_fep_pbch
(
PHY_VARS_NR_UE
*
ue
,
int
nr_slot_fep
(
PHY_VARS_NR_UE
*
ue
,
unsigned
char
l
,
unsigned
char
l
,
unsigned
char
Ns
,
unsigned
char
Ns
,
int
sample_offset
,
int
sample_offset
,
int
no_prefix
,
int
no_prefix
,
int
reset_freq_est
)
int
reset_freq_est
,
NR_CHANNEL_EST_t
channel
)
{
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
NR_UE_COMMON
*
common_vars
=
&
ue
->
common_vars
;
NR_UE_COMMON
*
common_vars
=
&
ue
->
common_vars
;
...
@@ -47,6 +49,11 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
...
@@ -47,6 +49,11 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
int
i
;
int
i
;
unsigned
int
frame_length_samples
=
frame_parms
->
samples_per_subframe
*
10
;
unsigned
int
frame_length_samples
=
frame_parms
->
samples_per_subframe
*
10
;
unsigned
int
rx_offset
;
unsigned
int
rx_offset
;
//NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[Ns>>1]][0];
uint16_t
coreset_start_subcarrier
=
frame_parms
->
first_carrier_offset
;
uint16_t
nb_rb_coreset
=
24
;
uint16_t
bwp_start_subcarrier
=
frame_parms
->
first_carrier_offset
;
uint16_t
nb_rb_pdsch
=
100
;
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
...
@@ -181,6 +188,9 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
...
@@ -181,6 +188,9 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
}
}
if
(
ue
->
perfect_ce
==
0
)
{
if
(
ue
->
perfect_ce
==
0
)
{
switch
(
channel
){
case
NR_PBCH_EST
:
if
((
l
>
0
)
&&
(
l
<
4
))
{
if
((
l
>
0
)
&&
(
l
<
4
))
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
...
@@ -196,7 +206,9 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
...
@@ -196,7 +206,9 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
l
,
l
,
symbol
);
symbol
);
}
}
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
// do frequency offset estimation here!
// do frequency offset estimation here!
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
...
@@ -221,6 +233,60 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
...
@@ -221,6 +233,60 @@ int slot_fep_pbch(PHY_VARS_NR_UE *ue,
}
}
}
}
break
;
case
NR_PDCCH_EST
:
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
#ifdef DEBUG_FEP
printf
(
"Channel estimation eNB %d, aatx %d, slot %d, symbol %d
\n
"
,
eNB_id
,
aa
,
Ns
,
l
);
#endif
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
nr_pdcch_channel_estimation
(
ue
,
eNB_id
,
0
,
Ns
,
aa
,
l
,
symbol
,
coreset_start_subcarrier
,
nb_rb_coreset
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
}
break
;
case
NR_PDSCH_EST
:
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
#ifdef DEBUG_FEP
printf
(
"Channel estimation eNB %d, aatx %d, slot %d, symbol %d
\n
"
,
eNB_id
,
aa
,
Ns
,
l
);
#endif
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
nr_pdsch_channel_estimation
(
ue
,
eNB_id
,
0
,
Ns
,
aa
,
l
,
symbol
,
bwp_start_subcarrier
,
nb_rb_pdsch
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
}
break
;
case
NR_SSS_EST
:
break
;
default:
LOG_E
(
PHY
,
"[UE][FATAL] Unknown channel format %d
\n
"
,
channel
);
return
(
-
1
);
break
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
View file @
734646bc
...
@@ -50,20 +50,77 @@ int wt1[8][2] = {{1,1},{1,1},{1,1},{1,1},{1,-1},{1,-1},{1,-1},{1,-1}};
...
@@ -50,20 +50,77 @@ int wt1[8][2] = {{1,1},{1,1},{1,1},{1,1},{1,-1},{1,-1},{1,-1},{1,-1}};
int
wf2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
1
}};
int
wf2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
1
},{
1
,
1
}};
int
wt2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
}};
int
wt2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
}};
//short nr_mod_table[14] = {0,0,-23170,-23170,23170,23170,-23170,-23170,-23170,23170,23170,-23170,23170,23170};
//short nr_mod_table[14] = {0,0,-23170,-23170,23170,23170,-23170,-23170,-23170,23170,23170,-23170,23170,23170};
short
nr_rx_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
-
23170
,
23170
};
short
nr_rx_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
-
23170
,
23170
};
//short nr_mod_table[14] = {0,0,23170,23170,-23170,-23170,23170,23170,23170,-23170,-23170,23170,-23170,-23170};
//short nr_mod_table[14] = {0,0,23170,23170,-23170,-23170,23170,23170,23170,-23170,-23170,23170,-23170,-23170};
//extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT];
//extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT];
short
nr_mod_table
[
14
]
=
{
0
,
0
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
-
23170
,
23170
};
int
nr_pdcch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_offset
,
unsigned
int
Ns
,
unsigned
int
nr_gold_pdcch
[
7
][
20
][
3
][
10
],
int32_t
*
output
,
unsigned
short
p
,
int
length_dmrs
,
unsigned
short
nb_rb_coreset
)
{
int32_t
qpsk
[
4
],
n
;
int
w
,
ind
,
l
,
ind_dword
,
ind_qpsk_symb
,
kp
,
k
;
short
pamp
;
// Compute the correct pilot amplitude, sqrt_rho_b = Q3.13
pamp
=
ONE_OVER_SQRT2_Q15
;
// This includes complex conjugate for channel estimation
((
short
*
)
&
qpsk
[
0
])[
0
]
=
pamp
;
((
short
*
)
&
qpsk
[
0
])[
1
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
1
])[
0
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
1
])[
1
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
2
])[
0
]
=
pamp
;
((
short
*
)
&
qpsk
[
2
])[
1
]
=
pamp
;
((
short
*
)
&
qpsk
[
3
])[
0
]
=
-
pamp
;
((
short
*
)
&
qpsk
[
3
])[
1
]
=
pamp
;
if
(
p
==
2000
)
{
// r_n from 38.211 7.4.1.3
for
(
n
=
0
;
n
<
nb_rb_coreset
*
3
;
n
++
)
{
for
(
l
=
0
;
l
<
length_dmrs
;
l
++
){
for
(
kp
=
0
;
kp
<
3
;
kp
++
){
ind
=
3
*
n
+
kp
;
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
output
[
k
]
=
qpsk
[(
nr_gold_pdcch
[
eNB_offset
][
Ns
][
l
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_DMRS
LOG_I
(
PHY
,
"Ns %d, p %d, ind_dword %d, ind_qpsk_symbol %d
\n
"
,
Ns
,
p
,
idx_dword
,
idx_qpsk_symb
);
LOG_I
(
PHY
,
"index = %d
\n
"
,(
nr_gold_pdsch
[
0
][
Ns
][
lprime
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
);
#endif
k
++
;
}
}
}
}
else
{
LOG_E
(
PHY
,
"Illegal PDCCH DMRS port %d
\n
"
,
p
);
}
return
(
0
);
}
int
nr_pdsch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
int
nr_pdsch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
u
nsigned
int
ncp
,
u
int8_t
eNB_offset
,
unsigned
int
Ns
,
unsigned
int
Ns
,
unsigned
int
nr_gold_pdsch
[
2
][
20
][
2
][
21
],
unsigned
int
nr_gold_pdsch
[
2
][
20
][
2
][
21
],
int32_t
*
output
,
int32_t
*
output
,
unsigned
short
p
,
unsigned
short
p
,
int
length_dmrs
,
int
length_dmrs
,
unsigned
short
nb_
pdsch_rb
)
unsigned
short
nb_
rb_pdsch
)
{
{
int32_t
qpsk
[
4
],
nqpsk
[
4
],
*
qpsk_p
,
n
;
int32_t
qpsk
[
4
],
nqpsk
[
4
],
*
qpsk_p
,
n
;
int
w
,
mprime
,
ind
,
l
,
ind_dword
,
ind_qpsk_symb
,
kp
,
lp
,
config_type
,
k
;
int
w
,
mprime
,
ind
,
l
,
ind_dword
,
ind_qpsk_symb
,
kp
,
lp
,
config_type
,
k
;
...
@@ -77,7 +134,7 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
...
@@ -77,7 +134,7 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
printf
(
"dmrs config type %d port %d
\n
"
,
config_type
,
p
);
printf
(
"dmrs config type %d port %d
\n
"
,
config_type
,
p
);
// Compute the correct pilot amplitude, sqrt_rho_b = Q3.13
// Compute the correct pilot amplitude, sqrt_rho_b = Q3.13
pamp
=
23170
;
//
ONE_OVER_SQRT2_Q15;
pamp
=
ONE_OVER_SQRT2_Q15
;
// This includes complex conjugate for channel estimation
// This includes complex conjugate for channel estimation
((
short
*
)
&
qpsk
[
0
])[
0
]
=
pamp
;
((
short
*
)
&
qpsk
[
0
])[
0
]
=
pamp
;
...
@@ -105,10 +162,9 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
...
@@ -105,10 +162,9 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
LOG_E
(
PHY
,
"Bad PDSCH DMRS config type %d
\n
"
,
config_type
);
LOG_E
(
PHY
,
"Bad PDSCH DMRS config type %d
\n
"
,
config_type
);
if
((
p
>=
1000
)
&&
(
p
<
((
config_type
==
0
)
?
1008
:
1012
)))
{
if
((
p
>=
1000
)
&&
(
p
<
((
config_type
==
0
)
?
1008
:
1012
)))
{
if
(
/*ue->frame_parms.Ncp == NORMAL*/
ncp
==
0
)
{
// r_n from 38.211 7.4.1.1
// r_n from 38.211 7.4.1.1
for
(
n
=
0
;
n
<
nb_
pdsch_rb
*
((
config_type
==
0
)
?
3
:
2
);
n
++
)
{
for
(
n
=
0
;
n
<
nb_
rb_pdsch
*
((
config_type
==
0
)
?
3
:
2
);
n
++
)
{
for
(
lp
=
0
;
lp
<
length_dmrs
;
lp
++
){
for
(
lp
=
0
;
lp
<
length_dmrs
;
lp
++
){
for
(
kp
=
0
;
kp
<
2
;
kp
++
){
for
(
kp
=
0
;
kp
<
2
;
kp
++
){
w
=
(
wf
[
p
-
1000
][
kp
])
*
(
wt
[
p
-
1000
][
lp
]);
w
=
(
wf
[
p
-
1000
][
kp
])
*
(
wt
[
p
-
1000
][
lp
]);
...
@@ -118,7 +174,7 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
...
@@ -118,7 +174,7 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
ind_dword
=
ind
>>
4
;
ind_dword
=
ind
>>
4
;
ind_qpsk_symb
=
ind
&
0xf
;
ind_qpsk_symb
=
ind
&
0xf
;
output
[
k
]
=
qpsk_p
[(
ue
->
nr_gold_pdsch
[
0
][
Ns
][
lp
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
output
[
k
]
=
qpsk_p
[(
nr_gold_pdsch
[
0
][
Ns
][
lp
][
ind_dword
]
>>
(
2
*
ind_qpsk_symb
))
&
3
];
#ifdef DEBUG_DL_DMRS
#ifdef DEBUG_DL_DMRS
...
@@ -131,9 +187,6 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
...
@@ -131,9 +187,6 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
}
}
}
}
}
}
}
else
{
LOG_E
(
PHY
,
"extended cp not supported for PDSCH DMRS yet
\n
"
);
}
}
else
{
}
else
{
LOG_E
(
PHY
,
"Illegal p %d PDSCH DMRS port
\n
"
,
p
);
LOG_E
(
PHY
,
"Illegal p %d PDSCH DMRS port
\n
"
,
p
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/nr_gold_ue.c
View file @
734646bc
...
@@ -64,11 +64,54 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue)
...
@@ -64,11 +64,54 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue)
}
}
void
nr_gold_pd
sch
(
PHY_VARS_NR_UE
*
ue
,
unsigned
short
lbar
,
unsigned
int
nr_gold_pdsch
[
2
][
20
][
2
][
21
],
unsigned
int
Nid_cell
,
unsigned
short
*
n_idDMRS
,
unsigned
short
length_dmrs
)
void
nr_gold_pd
cch
(
PHY_VARS_NR_UE
*
ue
,
unsigned
int
Nid_cell
,
unsigned
short
n_idDMRS
,
unsigned
short
length_dmrs
)
{
{
unsigned
char
ns
,
l
;
unsigned
char
ns
,
l
;
unsigned
int
n
,
x1
,
x2
,
x2tmp0
,
x2tmp1
,
x2tmp2
,
x2s
;
unsigned
int
n
,
x1
,
x2
,
x2tmp0
;
unsigned
int
nid
;
if
(
n_idDMRS
)
nid
=
n_idDMRS
;
else
nid
=
Nid_cell
;
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
for
(
l
=
0
;
l
<
length_dmrs
;
l
++
)
{
x2tmp0
=
((
14
*
ns
+
l
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
x2
=
(
x2tmp0
+
(
nid
<<
1
))
%
(
1
<<
31
);
//cinit
x1
=
1
+
(
1
<<
31
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
// skip first 50 double words (1600 bits)
for
(
n
=
1
;
n
<
50
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
//printf("x1 : %x, x2 : %x\n",x1,x2);
}
for
(
n
=
0
;
n
<
10
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
ue
->
nr_gold_pdcch
[
0
][
ns
][
l
][
n
]
=
x1
^
x2
;
//printf("n=%d : c %x\n",n,x1^x2);
}
}
}
}
void
nr_gold_pdsch
(
PHY_VARS_NR_UE
*
ue
,
unsigned
short
lbar
,
unsigned
int
Nid_cell
,
unsigned
short
*
n_idDMRS
,
unsigned
short
length_dmrs
)
{
unsigned
char
ns
,
l
;
unsigned
int
n
,
x1
,
x2
,
x2tmp0
;
int
nscid
;
int
nscid
;
unsigned
int
nid
;
unsigned
int
nid
;
...
@@ -86,7 +129,7 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned int nr_gold_p
...
@@ -86,7 +129,7 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned int nr_gold_p
for
(
l
=
0
;
l
<
length_dmrs
;
l
++
)
{
for
(
l
=
0
;
l
<
length_dmrs
;
l
++
)
{
x2tmp0
=
((
14
*
ns
+
(
lbar
+
l
)
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
x2tmp0
=
((
14
*
ns
+
(
lbar
+
l
)
+
1
)
*
((
nid
<<
1
)
+
1
))
<<
17
;
x2
=
(
x2tmp0
+
(
nid
<<
1
))
%
(
1
<<
31
);
//cinit
x2
=
(
x2tmp0
+
(
nid
<<
1
)
+
nscid
)
%
(
1
<<
31
);
//cinit
x1
=
1
+
(
1
<<
31
);
x1
=
1
+
(
1
<<
31
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
...
@@ -105,7 +148,7 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned int nr_gold_p
...
@@ -105,7 +148,7 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned int nr_gold_p
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
nr_gold_pdsch
[
nscid
][
ns
][
l
][
n
]
=
x1
^
x2
;
ue
->
nr_gold_pdsch
[
nscid
][
ns
][
l
][
n
]
=
x1
^
x2
;
//printf("n=%d : c %x\n",n,x1^x2);
//printf("n=%d : c %x\n",n,x1^x2);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
View file @
734646bc
...
@@ -31,20 +31,36 @@
...
@@ -31,20 +31,36 @@
*/
*/
int
nr_pbch_dmrs_rx
(
unsigned
int
*
nr_gold_pbch
,
int32_t
*
output
);
int
nr_pbch_dmrs_rx
(
unsigned
int
*
nr_gold_pbch
,
int32_t
*
output
);
/*int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
unsigned int ncp,
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
int
nr_pdcch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_offset
,
unsigned
int
Ns
,
unsigned
int
nr_gold_pdcch
[
7
][
20
][
3
][
10
],
int32_t
*
output
,
unsigned
short
p
,
int
length_dmrs
,
unsigned
short
nb_rb_corset
);
int
nr_pdsch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_offset
,
unsigned
int
Ns
,
unsigned
int
Ns
,
unsigned
int
nr_gold_pdsch
[
2
][
20
][
2
][
21
],
unsigned
int
nr_gold_pdsch
[
2
][
20
][
2
][
21
],
int32_t
*
output
,
int32_t
*
output
,
unsigned
short
p
,
unsigned
short
p
,
int
length_dmrs
,
int
length_dmrs
,
unsigned short nb_
pdsch_rb);*/
unsigned
short
nb_
rb_pdsch
);
void
nr_gold_pbch
(
PHY_VARS_NR_UE
*
ue
);
void
nr_gold_pbch
(
PHY_VARS_NR_UE
*
ue
);
void
nr_gold_pdcch
(
PHY_VARS_NR_UE
*
ue
,
unsigned
int
Nid_cell
,
unsigned
short
n_idDMRS
,
unsigned
short
length_dmrs
);
void
nr_gold_pdsch
(
PHY_VARS_NR_UE
*
ue
,
void
nr_gold_pdsch
(
PHY_VARS_NR_UE
*
ue
,
unsigned
short
lbar
,
unsigned
short
lbar
,
unsigned
int
nr_gold_pdsch
[
2
][
20
][
2
][
21
],
unsigned
int
Nid_cell
,
unsigned
int
Nid_cell
,
unsigned
short
*
n_idDMRS
,
unsigned
short
*
n_idDMRS
,
unsigned
short
length_dmrs
);
unsigned
short
length_dmrs
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h
View file @
734646bc
...
@@ -84,3 +84,28 @@ short filt16a_2l1[16] = {
...
@@ -84,3 +84,28 @@ short filt16a_2l1[16] = {
short
filt16a_2r1
[
16
]
=
{
short
filt16a_2r1
[
16
]
=
{
-
4096
,
0
,
4096
,
8192
,
12288
,
16384
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
-
4096
,
0
,
4096
,
8192
,
12288
,
16384
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
/*filter8*/
short
filt8_l0
[
8
]
=
{
16384
,
8192
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt8_mr0
[
8
]
=
{
0
,
8192
,
16384
,
8192
,
0
,
-
8192
,
0
,
0
};
short
filt8_r0
[
8
]
=
{
0
,
8192
,
16384
,
24576
,
0
,
0
,
0
,
0
};
short
filt8_m0
[
8
]
=
{
0
,
8192
,
16384
,
8192
,
0
,
0
,
0
,
0
};
short
filt8_l1
[
8
]
=
{
24576
,
16384
,
0
,
0
,
0
,
0
,
0
,
0
};
short
filt8_ml1
[
8
]
=
{
-
8192
,
0
,
8192
,
16384
,
8192
,
0
,
0
,
0
};
short
filt8_r1
[
8
]
=
{
0
,
0
,
8192
,
16384
,
0
,
0
,
0
,
0
};
short
filt8_m1
[
8
]
=
{
0
,
0
,
8192
,
16384
,
8192
,
0
,
0
,
0
};
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
734646bc
...
@@ -221,3 +221,364 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -221,3 +221,364 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
return
(
0
);
return
(
0
);
}
}
int
nr_pdcch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_id
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
p
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
short
coreset_start_subcarrier
,
unsigned
short
nb_rb_coreset
)
{
int
pilot
[
2
][
200
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
unsigned
short
k
;
unsigned
int
pilot_cnt
;
int16_t
ch
[
2
],
*
pil
,
*
rxF
,
*
dl_ch
,
*
fl
,
*
fm
,
*
fr
;
int
ch_offset
,
symbol_offset
;
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t
nushift
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
;
nushift
=
1
;
ue
->
frame_parms
.
nushift
=
nushift
;
if
(
ue
->
high_speed_flag
==
0
)
// use second channel estimate position for temporary storage
ch_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
;
else
ch_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
*
symbol
;
symbol_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
*
symbol
;
k
=
coreset_start_subcarrier
;
#ifdef DEBUG_CH
printf
(
"PBCH Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d symbol %d
\n
"
,
ue
->
current_thread_id
[
Ns
>>
1
],
eNB_offset
,
Nid_cell
,
ch_offset
,
ue
->
frame_parms
.
ofdm_symbol_size
,
ue
->
frame_parms
.
Ncp
,
l
,
Ns
,
k
,
symbol
);
#endif
fl
=
filt16a_l1
;
fm
=
filt16a_m1
;
fr
=
filt16a_r1
;
// generate pilot
nr_pdcch_dmrs_rx
(
ue
,
eNB_offset
,
Ns
,
ue
->
nr_gold_pdcch
[
eNB_offset
][
Ns
][
symbol
],
&
pilot
[
p
][
0
],
2000
,
symbol
,
nb_rb_coreset
);
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
pil
=
(
int16_t
*
)
&
pilot
[
p
][
0
];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
nushift
)];
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
ch_offset
];
memset
(
dl_ch
,
0
,
4
*
(
ue
->
frame_parms
.
ofdm_symbol_size
));
if
(
ue
->
high_speed_flag
==
0
)
// multiply previous channel estimate by ch_est_alpha
multadd_complex_vector_real_scalar
(
dl_ch
-
(
ue
->
frame_parms
.
ofdm_symbol_size
<<
1
),
ue
->
ch_est_alpha
,
dl_ch
-
(
ue
->
frame_parms
.
ofdm_symbol_size
<<
1
),
1
,
ue
->
frame_parms
.
ofdm_symbol_size
);
#ifdef DEBUG_CH
printf
(
"ch est pilot addr %p RB_DL %d
\n
"
,
&
pilot
[
p
][
0
],
ue
->
frame_parms
.
N_RB_DL
);
printf
(
"k %d, first_carrier %d
\n
"
,
k
,
ue
->
frame_parms
.
first_carrier_offset
);
printf
(
"rxF addr %p
\n
"
,
rxF
);
printf
(
"dl_ch addr %p
\n
"
,
dl_ch
);
#endif
if
((
ue
->
frame_parms
.
N_RB_DL
&
1
)
==
0
)
{
// Treat first 2 pilots specially (left edge)
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"ch 0 %d
\n
"
,((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
printf
(
"pilot 0 : rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
&
rxF
[
0
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fl
,
ch
,
dl_ch
,
16
);
pil
+=
2
;
rxF
+=
8
;
//for (int i= 0; i<8; i++)
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fm
,
ch
,
dl_ch
,
16
);
pil
+=
2
;
rxF
+=
8
;
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot 2 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fr
,
ch
,
dl_ch
,
16
);
pil
+=
2
;
rxF
+=
8
;
dl_ch
+=
24
;
k
+=
12
;
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
3
*
nb_rb_coreset
);
pilot_cnt
+=
3
)
{
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
){
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
nushift
)];}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fl
,
ch
,
dl_ch
,
16
);
//for (int i= 0; i<8; i++)
// printf("pilot_cnt %d dl_ch %d %d\n", pilot_cnt, dl_ch+i, *(dl_ch+i));
pil
+=
2
;
rxF
+=
8
;
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fm
,
ch
,
dl_ch
,
16
);
pil
+=
2
;
rxF
+=
8
;
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fr
,
ch
,
dl_ch
,
16
);
pil
+=
2
;
rxF
+=
8
;
dl_ch
+=
24
;
k
+=
12
;
}
}
}
return
(
0
);
}
int
nr_pdsch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_id
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
p
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
nb_rb_pdsch
)
{
int
pilot
[
2
][
200
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
unsigned
short
k
;
unsigned
int
pilot_cnt
;
int16_t
ch
[
2
],
*
pil
,
*
rxF
,
*
dl_ch
,
*
fl
,
*
fm
,
*
fr
,
*
fml
,
*
fmr
;
int
ch_offset
,
symbol_offset
;
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t
nushift
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]].
rxdataF
;
nushift
=
(
p
>>
1
)
&
1
;
ue
->
frame_parms
.
nushift
=
nushift
;
if
(
ue
->
high_speed_flag
==
0
)
// use second channel estimate position for temporary storage
ch_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
;
else
ch_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
*
symbol
;
symbol_offset
=
ue
->
frame_parms
.
ofdm_symbol_size
*
symbol
;
k
=
bwp_start_subcarrier
;
#ifdef DEBUG_CH
printf
(
"PBCH Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d symbol %d
\n
"
,
ue
->
current_thread_id
[
Ns
>>
1
],
eNB_offset
,
Nid_cell
,
ch_offset
,
ue
->
frame_parms
.
ofdm_symbol_size
,
ue
->
frame_parms
.
Ncp
,
l
,
Ns
,
k
,
symbol
);
#endif
switch
(
nushift
)
{
case
0
:
fl
=
filt8_l0
;
fm
=
filt8_m0
;
fr
=
filt8_r0
;
fml
=
filt8_m0
;
fmr
=
filt8_mr0
;
break
;
case
1
:
fl
=
filt8_l1
;
fm
=
filt8_m1
;
fr
=
filt8_r1
;
fml
=
filt8_ml1
;
fmr
=
filt8_m1
;
break
;
default:
msg
(
"pdsch_channel_estimation: nushift=%d -> ERROR
\n
"
,
nushift
);
return
(
-
1
);
break
;
}
// generate pilot
nr_pdsch_dmrs_rx
(
ue
,
eNB_offset
,
Ns
,
ue
->
nr_gold_pdsch
[
eNB_offset
][
Ns
][
symbol
],
&
pilot
[
p
][
0
],
1000
,
1
,
nb_rb_pdsch
);
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
pil
=
(
int16_t
*
)
&
pilot
[
p
][
0
];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
nushift
)];
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
ch_offset
];
memset
(
dl_ch
,
0
,
4
*
(
ue
->
frame_parms
.
ofdm_symbol_size
));
if
(
ue
->
high_speed_flag
==
0
)
// multiply previous channel estimate by ch_est_alpha
multadd_complex_vector_real_scalar
(
dl_ch
-
(
ue
->
frame_parms
.
ofdm_symbol_size
<<
1
),
ue
->
ch_est_alpha
,
dl_ch
-
(
ue
->
frame_parms
.
ofdm_symbol_size
<<
1
),
1
,
ue
->
frame_parms
.
ofdm_symbol_size
);
#ifdef DEBUG_CH
printf
(
"ch est pilot addr %p RB_DL %d
\n
"
,
&
pilot
[
p
][
0
],
ue
->
frame_parms
.
N_RB_DL
);
printf
(
"k %d, first_carrier %d
\n
"
,
k
,
ue
->
frame_parms
.
first_carrier_offset
);
printf
(
"rxF addr %p
\n
"
,
rxF
);
printf
(
"dl_ch addr %p
\n
"
,
dl_ch
);
#endif
if
((
ue
->
frame_parms
.
N_RB_DL
&
1
)
==
0
)
{
// Treat first 2 pilots specially (left edge)
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"ch 0 %d
\n
"
,((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
printf
(
"pilot 0 : rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
&
rxF
[
0
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fl
,
ch
,
dl_ch
,
8
);
pil
+=
2
;
rxF
+=
4
;
//for (int i= 0; i<8; i++)
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fml
,
ch
,
dl_ch
,
8
);
pil
+=
2
;
rxF
+=
4
;
dl_ch
+=
4
;
k
+=
4
;
for
(
pilot_cnt
=
2
;
pilot_cnt
<
(
6
*
(
nb_rb_pdsch
-
1
)
+
4
);
pilot_cnt
+=
2
)
{
if
((
pilot_cnt
%
6
)
==
0
)
dl_ch
+=
4
;
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
){
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
nushift
)];}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fm
,
ch
,
dl_ch
,
8
);
pil
+=
2
;
rxF
+=
4
;
dl_ch
+=
4
;
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fm
,
ch
,
dl_ch
,
8
);
pil
+=
2
;
rxF
+=
4
;
dl_ch
+=
4
;
k
+=
4
;
}
// Treat first 2 pilots specially (right edge)
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"ch 0 %d
\n
"
,((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
printf
(
"pilot 0 : rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
&
rxF
[
0
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fmr
,
ch
,
dl_ch
,
8
);
pil
+=
2
;
rxF
+=
4
;
//for (int i= 0; i<8; i++)
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_CH
printf
(
"pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
multadd_real_vector_complex_scalar
(
fr
,
ch
,
dl_ch
,
8
);
pil
+=
2
;
rxF
+=
4
;
dl_ch
+=
4
;
k
+=
4
;
}
}
return
(
0
);
}
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
734646bc
...
@@ -19,12 +19,12 @@
...
@@ -19,12 +19,12 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#ifndef __
LTE
_ESTIMATION_DEFS__H__
#ifndef __
NR
_ESTIMATION_DEFS__H__
#define __
LTE
_ESTIMATION_DEFS__H__
#define __
NR
_ESTIMATION_DEFS__H__
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
//
#include "PHY/defs_gNB.h"
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
* @{
* @{
*/
*/
...
@@ -42,13 +42,15 @@
...
@@ -42,13 +42,15 @@
\param l symbol within slot
\param l symbol within slot
\param symbol symbol within frame
\param symbol symbol within frame
*/
*/
int
nr_
dl
_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_
pdcch
_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
Ns
,
unsigned
char
p
,
unsigned
char
p
,
unsigned
char
l
,
unsigned
char
l
,
unsigned
char
symbol
);
unsigned
char
symbol
,
unsigned
short
coreset_start_subcarrier
,
unsigned
short
nb_rb_coreset
);
int
nr_pbch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
int
nr_pbch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
...
@@ -57,4 +59,14 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -57,4 +59,14 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
unsigned
char
p
,
unsigned
char
p
,
unsigned
char
l
,
unsigned
char
l
,
unsigned
char
symbol
);
unsigned
char
symbol
);
int
nr_pdsch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_id
,
uint8_t
eNB_offset
,
unsigned
char
Ns
,
unsigned
char
p
,
unsigned
char
l
,
unsigned
char
symbol
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
nb_rb_pdsch
);
#endif
#endif
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
734646bc
...
@@ -1141,16 +1141,15 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
...
@@ -1141,16 +1141,15 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
if
(
high_speed_flag
==
1
){
if
(
high_speed_flag
==
1
){
dl_ch0
=
&
dl_ch_estimates
[
aarx
][
5
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
))];
dl_ch0
=
&
dl_ch_estimates
[
aarx
][(
symbol
*
(
frame_parms
->
ofdm_symbol_size
))];
#ifdef NR_PDCCH_DCI_DEBUG
#ifdef NR_PDCCH_DCI_DEBUG
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> dl_ch0 = &dl_ch_estimates[aarx = (%d)][5 + (symbol * (frame_parms->ofdm_symbol_size (%d))) = (%d)]
\n
"
,
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> dl_ch0 = &dl_ch_estimates[aarx = (%d)][ (symbol * (frame_parms->ofdm_symbol_size (%d))) = (%d)]
\n
"
,
aarx
,
frame_parms
->
ofdm_symbol_size
,
5
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
)));
aarx
,
frame_parms
->
ofdm_symbol_size
,(
symbol
*
(
frame_parms
->
ofdm_symbol_size
)));
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> why pointer is pointing to that position (what does '5' mean)?
\n
"
);
#endif
#endif
}
else
{
}
else
{
dl_ch0
=
&
dl_ch_estimates
[
aarx
][
5
];
dl_ch0
=
&
dl_ch_estimates
[
aarx
][
0
];
#ifdef NR_PDCCH_DCI_DEBUG
#ifdef NR_PDCCH_DCI_DEBUG
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> dl_ch0 = &dl_ch_estimates[aarx = (%d)][
5
]
\n
"
,
aarx
);
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_pdcch_extract_rbs_single)-> dl_ch0 = &dl_ch_estimates[aarx = (%d)][
0
]
\n
"
,
aarx
);
#endif
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
734646bc
...
@@ -68,28 +68,31 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -68,28 +68,31 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
frame_parms
->
nb_prefix_samples0
=
0
;
frame_parms
->
nb_prefix_samples0
=
0
;
//symbol 1
//symbol 1
slot_fep_pbch
(
ue
,
nr_slot_fep
(
ue
,
1
,
1
,
0
,
0
,
ue
->
rx_offset
,
ue
->
rx_offset
,
0
,
0
,
1
);
1
,
NR_PBCH_EST
);
//symbol 2
//symbol 2
slot_fep_pbch
(
ue
,
nr_slot_fep
(
ue
,
2
,
2
,
0
,
0
,
ue
->
rx_offset
,
ue
->
rx_offset
,
0
,
0
,
1
);
1
,
NR_PBCH_EST
);
//symbol 3
//symbol 3
slot_fep_pbch
(
ue
,
nr_slot_fep
(
ue
,
3
,
3
,
0
,
0
,
ue
->
rx_offset
,
ue
->
rx_offset
,
0
,
0
,
1
);
1
,
NR_PBCH_EST
);
frame_parms
->
nb_prefix_samples0
=
nb_prefix_samples0
;
frame_parms
->
nb_prefix_samples0
=
nb_prefix_samples0
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/sss_nr.c
View file @
734646bc
...
@@ -424,20 +424,22 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max)
...
@@ -424,20 +424,22 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, int32_t *tot_metric,uint8_t *phase_max)
// Do FFTs for SSS/PSS
// Do FFTs for SSS/PSS
// SSS
// SSS
slot_fep_pbch
(
ue
,
nr_slot_fep
(
ue
,
SSS_SYMBOL_NB
,
// symbol number
SSS_SYMBOL_NB
,
// symbol number
0
,
// Ns slot number
0
,
// Ns slot number
ue
->
rx_offset
,
// sample_offset of int16_t
ue
->
rx_offset
,
// sample_offset of int16_t
0
,
// no_prefix
0
,
// no_prefix
1
);
// reset frequency estimation
1
,
// reset frequency estimation
NR_SSS_EST
);
// PSS
// PSS
slot_fep_pbch
(
ue
,
nr_slot_fep
(
ue
,
PSS_SYMBOL_NB
,
PSS_SYMBOL_NB
,
0
,
0
,
ue
->
rx_offset
,
ue
->
rx_offset
,
0
,
0
,
1
);
1
,
NR_SSS_EST
);
frame_parms
->
nb_prefix_samples0
=
nb_prefix_samples0
;
frame_parms
->
nb_prefix_samples0
=
nb_prefix_samples0
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_nr_UE.h
View file @
734646bc
...
@@ -312,6 +312,13 @@ typedef struct {
...
@@ -312,6 +312,13 @@ typedef struct {
UE_nr_rxtx_proc_t
proc_rxtx
[
RX_NB_TH
];
UE_nr_rxtx_proc_t
proc_rxtx
[
RX_NB_TH
];
}
UE_nr_proc_t
;
}
UE_nr_proc_t
;
typedef
enum
{
NR_PBCH_EST
=
0
,
NR_PDCCH_EST
,
NR_PDSCH_EST
,
NR_SSS_EST
,
}
NR_CHANNEL_EST_t
;
#define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
#define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
typedef
struct
{
typedef
struct
{
...
@@ -1078,7 +1085,7 @@ typedef struct {
...
@@ -1078,7 +1085,7 @@ typedef struct {
uint32_t
nr_gold_pdsch
[
2
][
20
][
2
][
21
];
uint32_t
nr_gold_pdsch
[
2
][
20
][
2
][
21
];
/// PDCCH DMRS
/// PDCCH DMRS
uint32_t
nr_gold_pdcch
[
10
][
3
][
42
];
uint32_t
nr_gold_pdcch
[
7
][
20
][
3
][
10
];
uint32_t
X_u
[
64
][
839
];
uint32_t
X_u
[
64
][
839
];
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
734646bc
...
@@ -5901,6 +5901,7 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
...
@@ -5901,6 +5901,7 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
LOG_D
(
PHY
,
" ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
LOG_D
(
PHY
,
" ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
nr_gold_pdcch
(
ue
,
ue
->
frame_parms
.
Nid_cell
,
0
,
3
);
for
(;
l
<=
3
;
l
++
)
{
for
(;
l
<=
3
;
l
++
)
{
if
(
abstraction_flag
==
0
)
{
if
(
abstraction_flag
==
0
)
{
...
@@ -5908,12 +5909,13 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
...
@@ -5908,12 +5909,13 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
start_meas
(
&
ue
->
ofdm_demod_stats
);
start_meas
(
&
ue
->
ofdm_demod_stats
);
#endif
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP
,
VCD_FUNCTION_IN
);
slot_fep_pbch
(
ue
,
nr_slot_fep
(
ue
,
l
,
l
,
(
nr_tti_rx
<<
1
),
(
nr_tti_rx
<<
1
),
0
,
0
,
0
,
0
,
0
);
0
,
NR_PDCCH_EST
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP
,
VCD_FUNCTION_OUT
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
ofdm_demod_stats
);
stop_meas
(
&
ue
->
ofdm_demod_stats
);
...
@@ -5970,6 +5972,17 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
...
@@ -5970,6 +5972,17 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
#endif
#endif
LOG_D
(
PHY
,
" ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
LOG_D
(
PHY
,
" ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_tti_rx
);
//to update from pdsch config
nr_gold_pdsch
(
ue
,
0
,
ue
->
frame_parms
.
Nid_cell
,
0
,
1
);
nr_slot_fep
(
ue
,
2
,
//to be updated from higher layer
(
nr_tti_rx
<<
1
),
0
,
0
,
0
,
NR_PDSCH_EST
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
generic_stat
);
start_meas
(
&
ue
->
generic_stat
);
#endif
#endif
...
@@ -5994,7 +6007,6 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
...
@@ -5994,7 +6007,6 @@ int phy_procedures_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
if
((
ue
->
dlsch_SI
[
eNB_id
])
&&
(
ue
->
dlsch_SI
[
eNB_id
]
->
active
==
1
))
{
if
((
ue
->
dlsch_SI
[
eNB_id
])
&&
(
ue
->
dlsch_SI
[
eNB_id
]
->
active
==
1
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI
,
VCD_FUNCTION_IN
);
ue_pdsch_procedures
(
ue
,
ue_pdsch_procedures
(
ue
,
proc
,
proc
,
eNB_id
,
eNB_id
,
SI_PDSCH
,
SI_PDSCH
,
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/nr-ue.c
View file @
734646bc
...
@@ -827,7 +827,7 @@ void *UE_thread(void *arg) {
...
@@ -827,7 +827,7 @@ void *UE_thread(void *arg) {
(
void
**
)
UE
->
common_vars
.
rxdata
,
(
void
**
)
UE
->
common_vars
.
rxdata
,
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
,
UE
->
frame_parms
.
ofdm_symbol_size
+
UE
->
frame_parms
.
nb_prefix_samples0
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
slot_fep_pbch
(
UE
,
0
,
0
,
0
,
0
,
0
);
nr_slot_fep
(
UE
,
0
,
0
,
0
,
0
,
0
,
NR_PBCH_EST
);
}
//UE->mode != loop_through_memory
}
//UE->mode != loop_through_memory
else
else
rt_sleep_ns
(
1000
*
1000
);
rt_sleep_ns
(
1000
*
1000
);
...
...
This diff is collapsed.
Click to expand it.
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