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
canghaiwuhen
OpenXG-RAN
Commits
e1fa6be7
Commit
e1fa6be7
authored
6 years ago
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue 403
parent
d383cd52
develop
1
128-ues
256_QAM_demod
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_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_NGAP_RRC
NR_SA_NGAP_RRC_wk42
NR_SA_itti_sim_wk48
NR_SCHED
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_enable_parallelization
NR_UE_stability_fixes
NR_UL_FAPI_programming
NR_UL_scheduler
NR_UL_scheduler_rebased
NR_UL_scheduling
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_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_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-docker-compose
ci-rd-july-improvements
ci-ul-iperf-from-trf-container
clean-5G-scope-round2
cleanup_softmodem_main
constant_power
debug_branch_init_sync
develop-ci
develop-nr
develop-nr-fr2
develop-nr-fr2-rework
develop-nr_cppcheck
develop-oriecpriupdates
develop-sib1
develop_inria_ci_deployment
develop_inria_ci_deployment_gp
develop_integration_2020_w15
develop_integration_2020_w19
develop_integration_w08
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_do_ra_data
fix_pdsch_low_prb
fix_rfsim_mimo
fix_rrc_x2_ticking
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
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
inter-RRU-final
inter-RRU-nr
inter-RRU-oairu
inter-rru-UE
interoperability-test
isip_nr
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
mosaic5g-oai-ran
mosaic5g-oai-sim
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-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-uldci
nrUE
nrUE-hs
nrUE-upper-layer
nr_beamforming
nr_bsr
nr_csi_newbranch
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_pdcch_testing
nr_pdcch_updates
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_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
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_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
s1ap-bugfix-rab_setup
small-bugfixes-w40
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_dlsch-multi-threading
ue_dlsch_decoding_ldpc_offload
ue_nfapi_mch
uhd_priority_set_cleanup
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
x2-endc-processing
yihongzheng_srb
zzs
No related merge requests found
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
986 additions
and
1078 deletions
+986
-1078
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+2
-5
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+5
-5
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+11
-18
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
+6
-6
openair1/PHY/CODING/nr_polar_init.c
openair1/PHY/CODING/nr_polar_init.c
+17
-33
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+0
-5
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+1
-3
openair1/PHY/NR_TRANSPORT/nr_dci.h
openair1/PHY/NR_TRANSPORT/nr_dci.h
+0
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+3
-2
openair1/PHY/NR_TRANSPORT/nr_transport.h
openair1/PHY/NR_TRANSPORT/nr_transport.h
+0
-1
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+1
-4
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+1
-9
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+0
-1
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+0
-3
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+0
-2
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+42
-38
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+897
-942
No files found.
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
e1fa6be7
...
@@ -158,9 +158,7 @@ int main(int argc, char *argv[]) {
...
@@ -158,9 +158,7 @@ int main(int argc, char *argv[]) {
int16_t
channelOutput_int16
[
coderLength
];
int16_t
channelOutput_int16
[
coderLength
];
t_nrPolar_paramsPtr
nrPolar_params
=
NULL
,
currentPtr
=
NULL
;
t_nrPolar_params
currentPtr
=
nr_polar_params
(
polarMessageType
,
testLength
,
aggregation_level
);
nr_polar_init
(
&
nrPolar_params
,
polarMessageType
,
testLength
,
aggregation_level
);
currentPtr
=
nr_polar_params
(
nrPolar_params
,
polarMessageType
,
testLength
,
aggregation_level
);
#ifdef DEBUG_DCI_POLAR_PARAMS
#ifdef DEBUG_DCI_POLAR_PARAMS
uint32_t
dci_pdu
[
4
];
uint32_t
dci_pdu
[
4
];
...
@@ -173,8 +171,7 @@ int main(int argc, char *argv[]) {
...
@@ -173,8 +171,7 @@ int main(int argc, char *argv[]) {
uint16_t
size
=
41
;
uint16_t
size
=
41
;
uint16_t
rnti
=
3
;
uint16_t
rnti
=
3
;
aggregation_level
=
8
;
aggregation_level
=
8
;
nr_polar_init
(
&
nrPolar_params
,
1
,
size
,
aggregation_level
);
t_nrPolar_params
*
currentPtrDCI
=
nr_polar_params
(
1
,
size
,
aggregation_level
);
t_nrPolar_paramsPtr
currentPtrDCI
=
nr_polar_params
(
nrPolar_params
,
1
,
size
,
aggregation_level
);
polar_encoder_dci
(
dci_pdu
,
encoder_output
,
currentPtrDCI
,
rnti
);
polar_encoder_dci
(
dci_pdu
,
encoder_output
,
currentPtrDCI
,
rnti
);
for
(
int
i
=
0
;
i
<
54
;
i
++
)
for
(
int
i
=
0
;
i
<
54
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
e1fa6be7
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
int8_t
polar_decoder
(
int8_t
polar_decoder
(
double
*
input
,
double
*
input
,
uint8_t
*
out
,
uint8_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
)
uint8_t
pathMetricAppr
)
{
{
...
@@ -282,7 +282,7 @@ int8_t polar_decoder(
...
@@ -282,7 +282,7 @@ int8_t polar_decoder(
int8_t
polar_decoder_aPriori
(
double
*
input
,
int8_t
polar_decoder_aPriori
(
double
*
input
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
double
*
aPrioriPayload
)
double
*
aPrioriPayload
)
...
@@ -538,7 +538,7 @@ int8_t polar_decoder_aPriori(double *input,
...
@@ -538,7 +538,7 @@ int8_t polar_decoder_aPriori(double *input,
int8_t
polar_decoder_aPriori_timing
(
double
*
input
,
int8_t
polar_decoder_aPriori_timing
(
double
*
input
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
double
*
aPrioriPayload
,
double
*
aPrioriPayload
,
...
@@ -793,7 +793,7 @@ int8_t polar_decoder_aPriori_timing(double *input,
...
@@ -793,7 +793,7 @@ int8_t polar_decoder_aPriori_timing(double *input,
int8_t
polar_decoder_dci
(
double
*
input
,
int8_t
polar_decoder_dci
(
double
*
input
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
uint16_t
n_RNTI
)
uint16_t
n_RNTI
)
...
@@ -1073,7 +1073,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
...
@@ -1073,7 +1073,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint64_t
*
out
,
uint64_t
*
out
,
t_nrPolar_params
*
polarParams
)
const
t_nrPolar_params
*
polarParams
)
{
{
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
e1fa6be7
...
@@ -136,42 +136,41 @@ struct nrPolar_params {
...
@@ -136,42 +136,41 @@ struct nrPolar_params {
decoder_tree_t
tree
;
decoder_tree_t
tree
;
}
__attribute__
((
__packed__
));
}
__attribute__
((
__packed__
));
typedef
struct
nrPolar_params
t_nrPolar_params
;
typedef
struct
nrPolar_params
t_nrPolar_params
;
typedef
t_nrPolar_params
*
t_nrPolar_paramsPtr
;
void
polar_encoder
(
uint32_t
*
input
,
void
polar_encoder
(
uint32_t
*
input
,
uint32_t
*
output
,
uint32_t
*
output
,
t_nrPolar_params
Ptr
polarParams
);
t_nrPolar_params
*
polarParams
);
void
polar_encoder_dci
(
uint32_t
*
in
,
void
polar_encoder_dci
(
uint32_t
*
in
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint16_t
n_RNTI
);
uint16_t
n_RNTI
);
void
polar_encoder_fast
(
uint64_t
*
A
,
void
polar_encoder_fast
(
uint64_t
*
A
,
uint32_t
*
out
,
uint32_t
*
out
,
int32_t
crcmask
,
int32_t
crcmask
,
t_nrPolar_params
Ptr
polarParams
);
t_nrPolar_params
*
polarParams
);
int8_t
polar_decoder
(
double
*
input
,
int8_t
polar_decoder
(
double
*
input
,
uint8_t
*
output
,
uint8_t
*
output
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
);
uint8_t
pathMetricAppr
);
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint64_t
*
out
,
uint64_t
*
out
,
t_nrPolar_params
*
polarParams
);
const
t_nrPolar_params
*
polarParams
);
int8_t
polar_decoder_aPriori
(
double
*
input
,
int8_t
polar_decoder_aPriori
(
double
*
input
,
uint32_t
*
output
,
uint32_t
*
output
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
double
*
aPrioriPayload
);
double
*
aPrioriPayload
);
int8_t
polar_decoder_aPriori_timing
(
double
*
input
,
int8_t
polar_decoder_aPriori_timing
(
double
*
input
,
uint32_t
*
output
,
uint32_t
*
output
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
double
*
aPrioriPayload
,
double
*
aPrioriPayload
,
...
@@ -180,7 +179,7 @@ int8_t polar_decoder_aPriori_timing(double *input,
...
@@ -180,7 +179,7 @@ int8_t polar_decoder_aPriori_timing(double *input,
int8_t
polar_decoder_dci
(
double
*
input
,
int8_t
polar_decoder_dci
(
double
*
input
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint8_t
listSize
,
uint8_t
listSize
,
uint8_t
pathMetricAppr
,
uint8_t
pathMetricAppr
,
uint16_t
n_RNTI
);
uint16_t
n_RNTI
);
...
@@ -189,18 +188,12 @@ void generic_polar_decoder(t_nrPolar_params *,
...
@@ -189,18 +188,12 @@ void generic_polar_decoder(t_nrPolar_params *,
decoder_node_t
*
);
decoder_node_t
*
);
void
build_decoder_tree
(
t_nrPolar_params
*
pp
);
void
build_decoder_tree
(
t_nrPolar_params
*
pp
);
void
build_polar_tables
(
t_nrPolar_params
Ptr
polarParams
);
void
build_polar_tables
(
t_nrPolar_params
*
polarParams
);
void
init_polar_deinterleaver_table
(
t_nrPolar_params
*
polarParams
);
void
init_polar_deinterleaver_table
(
t_nrPolar_params
*
polarParams
);
void
nr_polar_init
(
t_nrPolar_paramsPtr
*
polarParams
,
void
nr_polar_print_polarParams
(
t_nrPolar_params
*
polarParams
);
int8_t
messageType
,
uint16_t
messageLength
,
uint8_t
aggregation_level
);
void
nr_polar_print_polarParams
(
t_nrPolar_paramsPtr
polarParams
);
t_nrPolar_params
*
nr_polar_params
(
int8_t
messageType
,
t_nrPolar_paramsPtr
nr_polar_params
(
t_nrPolar_paramsPtr
polarParams
,
int8_t
messageType
,
uint16_t
messageLength
,
uint16_t
messageLength
,
uint8_t
aggregation_level
);
uint8_t
aggregation_level
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
View file @
e1fa6be7
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
void
polar_encoder
(
uint32_t
*
in
,
void
polar_encoder
(
uint32_t
*
in
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
)
t_nrPolar_params
*
polarParams
)
{
{
if
(
polarParams
->
idx
==
0
){
//PBCH
if
(
polarParams
->
idx
==
0
){
//PBCH
/*
/*
...
@@ -151,7 +151,7 @@ nr_bit2byte_uint32_8_t((uint32_t*)&B, polarParams->K, polarParams->nr_polar_B);*
...
@@ -151,7 +151,7 @@ nr_bit2byte_uint32_8_t((uint32_t*)&B, polarParams->K, polarParams->nr_polar_B);*
void
polar_encoder_dci
(
uint32_t
*
in
,
void
polar_encoder_dci
(
uint32_t
*
in
,
uint32_t
*
out
,
uint32_t
*
out
,
t_nrPolar_params
Ptr
polarParams
,
t_nrPolar_params
*
polarParams
,
uint16_t
n_RNTI
)
uint16_t
n_RNTI
)
{
{
#ifdef DEBUG_POLAR_ENCODER_DCI
#ifdef DEBUG_POLAR_ENCODER_DCI
...
@@ -284,9 +284,9 @@ void polar_encoder_dci(uint32_t *in,
...
@@ -284,9 +284,9 @@ void polar_encoder_dci(uint32_t *in,
#endif
#endif
}
}
static
inline
void
polar_rate_matching
(
t_nrPolar_params
Ptr
polarParams
,
void
*
in
,
void
*
out
)
__attribute__
((
always_inline
));
static
inline
void
polar_rate_matching
(
t_nrPolar_params
*
polarParams
,
void
*
in
,
void
*
out
)
__attribute__
((
always_inline
));
static
inline
void
polar_rate_matching
(
t_nrPolar_params
Ptr
polarParams
,
void
*
in
,
void
*
out
)
{
static
inline
void
polar_rate_matching
(
t_nrPolar_params
*
polarParams
,
void
*
in
,
void
*
out
)
{
if
(
polarParams
->
groupsize
==
8
)
if
(
polarParams
->
groupsize
==
8
)
for
(
int
i
=
0
;
i
<
polarParams
->
encoderLength
>>
3
;
i
++
)
((
uint8_t
*
)
out
)[
i
]
=
((
uint8_t
*
)
in
)[
polarParams
->
rm_tab
[
i
]];
for
(
int
i
=
0
;
i
<
polarParams
->
encoderLength
>>
3
;
i
++
)
((
uint8_t
*
)
out
)[
i
]
=
((
uint8_t
*
)
in
)[
polarParams
->
rm_tab
[
i
]];
...
@@ -296,7 +296,7 @@ static inline void polar_rate_matching(t_nrPolar_paramsPtr polarParams,void *in,
...
@@ -296,7 +296,7 @@ static inline void polar_rate_matching(t_nrPolar_paramsPtr polarParams,void *in,
}
}
}
}
void
build_polar_tables
(
t_nrPolar_params
Ptr
polarParams
)
{
void
build_polar_tables
(
t_nrPolar_params
*
polarParams
)
{
// build table b -> c'
// build table b -> c'
...
@@ -388,7 +388,7 @@ void build_polar_tables(t_nrPolar_paramsPtr polarParams) {
...
@@ -388,7 +388,7 @@ void build_polar_tables(t_nrPolar_paramsPtr polarParams) {
void
polar_encoder_fast
(
uint64_t
*
A
,
void
polar_encoder_fast
(
uint64_t
*
A
,
uint32_t
*
out
,
uint32_t
*
out
,
int32_t
crcmask
,
int32_t
crcmask
,
t_nrPolar_params
Ptr
polarParams
)
{
t_nrPolar_params
*
polarParams
)
{
AssertFatal
(
polarParams
->
K
>
32
,
"K = %d < 33, is not supported yet
\n
"
,
polarParams
->
K
);
AssertFatal
(
polarParams
->
K
>
32
,
"K = %d < 33, is not supported yet
\n
"
,
polarParams
->
K
);
AssertFatal
(
polarParams
->
K
<
129
,
"K = %d > 128, is not supported yet
\n
"
,
polarParams
->
K
);
AssertFatal
(
polarParams
->
K
<
129
,
"K = %d > 128, is not supported yet
\n
"
,
polarParams
->
K
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nr_polar_init.c
View file @
e1fa6be7
...
@@ -41,12 +41,12 @@ static int intcmp(const void *p1,const void *p2) {
...
@@ -41,12 +41,12 @@ static int intcmp(const void *p1,const void *p2) {
return
(
*
(
int16_t
*
)
p1
>
*
(
int16_t
*
)
p2
);
return
(
*
(
int16_t
*
)
p1
>
*
(
int16_t
*
)
p2
);
}
}
void
nr_polar_init
(
t_nrPolar_paramsPtr
*
polarParams
,
static
void
nr_polar_init
(
t_nrPolar_params
*
*
polarParams
,
int8_t
messageType
,
int8_t
messageType
,
uint16_t
messageLength
,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
uint8_t
aggregation_level
)
{
{
t_nrPolar_params
Ptr
currentPtr
=
*
polarParams
;
t_nrPolar_params
*
currentPtr
=
*
polarParams
;
uint16_t
aggregation_prime
=
nr_polar_aggregation_prime
(
aggregation_level
);
uint16_t
aggregation_prime
=
nr_polar_aggregation_prime
(
aggregation_level
);
//Parse the list. If the node is already created, return without initialization.
//Parse the list. If the node is already created, return without initialization.
...
@@ -58,7 +58,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
...
@@ -58,7 +58,7 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
// printf("currentPtr %p (polarParams %p)\n",currentPtr,polarParams);
// printf("currentPtr %p (polarParams %p)\n",currentPtr,polarParams);
//Else, initialize and add node to the end of the linked list.
//Else, initialize and add node to the end of the linked list.
t_nrPolar_params
Ptr
newPolarInitNode
=
malloc
(
sizeof
(
t_nrPolar_params
));
t_nrPolar_params
*
newPolarInitNode
=
malloc
(
sizeof
(
t_nrPolar_params
));
if
(
newPolarInitNode
!=
NULL
)
{
if
(
newPolarInitNode
!=
NULL
)
{
...
@@ -170,30 +170,15 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
...
@@ -170,30 +170,15 @@ void nr_polar_init(t_nrPolar_paramsPtr *polarParams,
//printf("decoder tree nodes %d\n",newPolarInitNode->tree.num_nodes);
//printf("decoder tree nodes %d\n",newPolarInitNode->tree.num_nodes);
}
else
{
}
else
{
AssertFatal
(
1
==
0
,
"[nr_polar_init] New t_nrPolar_params
Ptr
could not be created"
);
AssertFatal
(
1
==
0
,
"[nr_polar_init] New t_nrPolar_params
*
could not be created"
);
}
}
currentPtr
=
*
polarParams
;
newPolarInitNode
->
nextPtr
=*
polarParams
;
//If polarParams is empty:
*
polarParams
=
newPolarInitNode
;
if
(
currentPtr
==
NULL
)
{
*
polarParams
=
newPolarInitNode
;
//printf("Creating first polarParams entry index %d, %p\n",newPolarInitNode->idx,*polarParams);
return
;
}
//Else, add node to the end of the linked list.
while
(
currentPtr
->
nextPtr
!=
NULL
)
{
currentPtr
=
currentPtr
->
nextPtr
;
}
currentPtr
->
nextPtr
=
newPolarInitNode
;
printf
(
"Adding new polarParams entry to list index %d,%p
\n
"
,
newPolarInitNode
->
idx
,
currentPtr
->
nextPtr
);
return
;
return
;
}
}
void
nr_polar_print_polarParams
(
t_nrPolar_params
Ptr
polarParams
)
void
nr_polar_print_polarParams
(
t_nrPolar_params
*
polarParams
)
{
{
uint8_t
i
=
0
;
uint8_t
i
=
0
;
if
(
polarParams
==
NULL
)
{
if
(
polarParams
==
NULL
)
{
...
@@ -208,23 +193,22 @@ void nr_polar_print_polarParams(t_nrPolar_paramsPtr polarParams)
...
@@ -208,23 +193,22 @@ void nr_polar_print_polarParams(t_nrPolar_paramsPtr polarParams)
return
;
return
;
}
}
t_nrPolar_paramsPtr
nr_polar_params
(
t_nrPolar_paramsPtr
polarParams
,
t_nrPolar_params
*
nr_polar_params
(
int8_t
messageType
,
int8_t
messageType
,
uint16_t
messageLength
,
uint16_t
messageLength
,
uint8_t
aggregation_level
)
uint8_t
aggregation_level
)
{
{
t_nrPolar_paramsPtr
currentPtr
=
NULL
;
static
t_nrPolar_params
*
polarList
=
NULL
;
nr_polar_init
(
&
polarList
,
messageType
,
messageLength
,
aggregation_level
);
t_nrPolar_params
*
polarParams
=
polarList
;
const
int
tag
=
messageType
*
messageLength
*
nr_polar_aggregation_prime
(
aggregation_level
);
while
(
polarParams
!=
NULL
)
{
while
(
polarParams
!=
NULL
)
{
if
(
polarParams
->
idx
==
if
(
polarParams
->
idx
==
tag
)
(
messageType
*
messageLength
*
(
nr_polar_aggregation_prime
(
aggregation_level
))
))
{
return
polarParams
;
currentPtr
=
polarParams
;
break
;
}
else
{
polarParams
=
polarParams
->
nextPtr
;
polarParams
=
polarParams
->
nextPtr
;
}
}
}
AssertFatal
(
false
,
"Polar Init tables internal failure
\n
"
);
return
currentPtr
;
return
NULL
;
}
}
uint16_t
nr_polar_aggregation_prime
(
uint8_t
aggregation_level
)
uint16_t
nr_polar_aggregation_prime
(
uint8_t
aggregation_level
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/nr_init.c
View file @
e1fa6be7
...
@@ -126,11 +126,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
...
@@ -126,11 +126,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
nr_init_pbch_dmrs
(
gNB
);
nr_init_pbch_dmrs
(
gNB
);
// Polar encoder init for PBCH
// Polar encoder init for PBCH
nr_polar_init
(
&
gNB
->
nrPolar_params
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
//PDCCH DMRS init
//PDCCH DMRS init
gNB
->
nr_gold_pdcch_dmrs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
gNB
->
nr_gold_pdcch_dmrs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
uint32_t
***
pdcch_dmrs
=
gNB
->
nr_gold_pdcch_dmrs
;
uint32_t
***
pdcch_dmrs
=
gNB
->
nr_gold_pdcch_dmrs
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
e1fa6be7
...
@@ -159,7 +159,6 @@ void nr_pdcch_scrambling(uint32_t *in,
...
@@ -159,7 +159,6 @@ void nr_pdcch_scrambling(uint32_t *in,
}
}
uint8_t
nr_generate_dci_top
(
NR_gNB_PDCCH
pdcch_vars
,
uint8_t
nr_generate_dci_top
(
NR_gNB_PDCCH
pdcch_vars
,
t_nrPolar_paramsPtr
*
nrPolar_params
,
uint32_t
**
gold_pdcch_dmrs
,
uint32_t
**
gold_pdcch_dmrs
,
int32_t
*
txdataF
,
int32_t
*
txdataF
,
int16_t
amp
,
int16_t
amp
,
...
@@ -249,8 +248,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
...
@@ -249,8 +248,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
uint16_t
Nid
=
(
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
)
?
uint16_t
Nid
=
(
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
)
?
pdcch_params
.
scrambling_id
:
config
.
sch_config
.
physical_cell_id
.
value
;
pdcch_params
.
scrambling_id
:
config
.
sch_config
.
physical_cell_id
.
value
;
nr_polar_init
(
nrPolar_params
,
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_alloc
.
size
,
dci_alloc
.
L
);
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_alloc
.
size
,
dci_alloc
.
L
);
t_nrPolar_paramsPtr
currentPtr
=
nr_polar_params
(
*
nrPolar_params
,
NR_POLAR_DCI_MESSAGE_TYPE
,
dci_alloc
.
size
,
dci_alloc
.
L
);
polar_encoder_fast
(
dci_alloc
.
dci_pdu
,
encoder_output
,
pdcch_params
.
rnti
,
currentPtr
);
polar_encoder_fast
(
dci_alloc
.
dci_pdu
,
encoder_output
,
pdcch_params
.
rnti
,
currentPtr
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_dci.h
View file @
e1fa6be7
...
@@ -33,7 +33,6 @@ uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
...
@@ -33,7 +33,6 @@ uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
nfapi_nr_config_request_t
*
config
);
nfapi_nr_config_request_t
*
config
);
uint8_t
nr_generate_dci_top
(
NR_gNB_PDCCH
pdcch_vars
,
uint8_t
nr_generate_dci_top
(
NR_gNB_PDCCH
pdcch_vars
,
t_nrPolar_paramsPtr
*
nrPolar_params
,
uint32_t
**
gold_pdcch_dmrs
,
uint32_t
**
gold_pdcch_dmrs
,
int32_t
*
txdataF
,
int32_t
*
txdataF
,
int16_t
amp
,
int16_t
amp
,
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
e1fa6be7
...
@@ -225,7 +225,6 @@ void nr_init_pbch_interleaver(uint8_t *interleaver) {
...
@@ -225,7 +225,6 @@ void nr_init_pbch_interleaver(uint8_t *interleaver) {
}
}
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
t_nrPolar_paramsPtr
polar_params
,
uint8_t
*
pbch_pdu
,
uint8_t
*
pbch_pdu
,
uint8_t
*
interleaver
,
uint8_t
*
interleaver
,
int32_t
*
txdataF
,
int32_t
*
txdataF
,
...
@@ -307,7 +306,9 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -307,7 +306,9 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
/// CRC, coding and rate matching
/// CRC, coding and rate matching
polar_encoder_fast
(
&
a_reversed
,
(
uint32_t
*
)
pbch
->
pbch_e
,
0
,
polar_params
);
polar_encoder_fast
(
&
a_reversed
,
(
uint32_t
*
)
pbch
->
pbch_e
,
0
,
nr_polar_params
(
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
)
);
#ifdef DEBUG_PBCH_ENCODING
#ifdef DEBUG_PBCH_ENCODING
printf
(
"Channel coding:
\n
"
);
printf
(
"Channel coding:
\n
"
);
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E_DWORD
;
i
++
)
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E_DWORD
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_transport.h
View file @
e1fa6be7
...
@@ -85,7 +85,6 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
...
@@ -85,7 +85,6 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
@returns 0 on success
@returns 0 on success
*/
*/
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
t_nrPolar_paramsPtr
polar_params
,
uint8_t
*
pbch_pdu
,
uint8_t
*
pbch_pdu
,
uint8_t
*
interleaver
,
uint8_t
*
interleaver
,
int32_t
*
txdataF
,
int32_t
*
txdataF
,
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
e1fa6be7
...
@@ -1136,7 +1136,6 @@ void nr_dci_decoding_procedure0(int s,
...
@@ -1136,7 +1136,6 @@ void nr_dci_decoding_procedure0(int s,
int
coreset_nbr_cce_per_symbol
=
0
;
int
coreset_nbr_cce_per_symbol
=
0
;
t_nrPolar_paramsPtr
nrPolar_params
=
pdcch_vars
[
eNB_id
]
->
nrPolar_params
;
#ifdef NR_PDCCH_DCI_DEBUG
#ifdef NR_PDCCH_DCI_DEBUG
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found is %d
\n
"
,
*
format_found
);
printf
(
"
\t\t
<-NR_PDCCH_DCI_DEBUG (nr_dci_decoding_procedure0)-> format_found is %d
\n
"
,
*
format_found
);
...
@@ -1364,9 +1363,7 @@ void nr_dci_decoding_procedure0(int s,
...
@@ -1364,9 +1363,7 @@ void nr_dci_decoding_procedure0(int s,
uint64_t
dci_estimation
[
2
]
=
{
0
};
uint64_t
dci_estimation
[
2
]
=
{
0
};
nr_polar_init
(
&
nrPolar_params
,
1
,
sizeof_bits
,
L2
);
const
t_nrPolar_params
*
currentPtrDCI
=
nr_polar_params
(
1
,
sizeof_bits
,
L2
);
t_nrPolar_paramsPtr
currentPtrDCI
=
nr_polar_params
(
nrPolar_params
,
1
,
sizeof_bits
,
L2
);
decoderState
=
polar_decoder_int16
(
&
pdcch_vars
[
eNB_id
]
->
e_rx
[
CCEind
*
9
*
6
*
2
],
decoderState
=
polar_decoder_int16
(
&
pdcch_vars
[
eNB_id
]
->
e_rx
[
CCEind
*
9
*
6
*
2
],
dci_estimation
,
dci_estimation
,
currentPtrDCI
);
currentPtrDCI
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
e1fa6be7
...
@@ -566,15 +566,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -566,15 +566,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
//polar decoding de-rate matching
//polar decoding de-rate matching
const
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
nr_polar_init
(
&
nr_ue_pbch_vars
->
nrPolar_params
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
AssertFatal
(
nr_ue_pbch_vars
->
nrPolar_params
!=
NULL
,
"nr_ue_pbch_vars->nrPolar_params is null
\n
"
);
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
nr_ue_pbch_vars
->
nrPolar_params
,
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
decoderState
=
polar_decoder_int16
(
pbch_e_rx
,(
uint64_t
*
)
&
nr_ue_pbch_vars
->
pbch_a_prime
,
currentPtr
);
decoderState
=
polar_decoder_int16
(
pbch_e_rx
,(
uint64_t
*
)
&
nr_ue_pbch_vars
->
pbch_a_prime
,
currentPtr
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_gNB.h
View file @
e1fa6be7
...
@@ -391,7 +391,6 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -391,7 +391,6 @@ typedef struct PHY_VARS_gNB_s {
Sched_Rsp_t
Sched_INFO
;
Sched_Rsp_t
Sched_INFO
;
NR_gNB_PDCCH
pdcch_vars
;
NR_gNB_PDCCH
pdcch_vars
;
NR_gNB_PBCH
pbch
;
NR_gNB_PBCH
pbch
;
t_nrPolar_paramsPtr
nrPolar_params
;
LTE_eNB_PHICH
phich_vars
[
2
];
LTE_eNB_PHICH
phich_vars
[
2
];
NR_gNB_COMMON
common_vars
;
NR_gNB_COMMON
common_vars
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_nr_UE.h
View file @
e1fa6be7
...
@@ -892,7 +892,6 @@ typedef struct {
...
@@ -892,7 +892,6 @@ typedef struct {
//Check for specific DCIFormat and AgregationLevel
//Check for specific DCIFormat and AgregationLevel
uint8_t
dciFormat
;
uint8_t
dciFormat
;
uint8_t
agregationLevel
;
uint8_t
agregationLevel
;
t_nrPolar_paramsPtr
nrPolar_params
;
#ifdef NR_PDCCH_DEFS_NR_UE
#ifdef NR_PDCCH_DEFS_NR_UE
int
nb_searchSpaces
;
int
nb_searchSpaces
;
// CORESET structure, where maximum number of CORESETs to be handled is 3 (according to 38.331 V15.1.0)
// CORESET structure, where maximum number of CORESETs to be handled is 3 (according to 38.331 V15.1.0)
...
@@ -933,8 +932,6 @@ typedef struct {
...
@@ -933,8 +932,6 @@ typedef struct {
/// \brief Pointer to PBCH decoded output.
/// \brief Pointer to PBCH decoded output.
/// - first index: ? [0..63] (hard coded)
/// - first index: ? [0..63] (hard coded)
uint8_t
*
decoded_output
;
uint8_t
*
decoded_output
;
/// polar decoder parameters
t_nrPolar_paramsPtr
nrPolar_params
;
/// \brief Total number of PDU errors.
/// \brief Total number of PDU errors.
uint32_t
pdu_errors
;
uint32_t
pdu_errors
;
/// \brief Total number of PDU errors 128 frames ago.
/// \brief Total number of PDU errors 128 frames ago.
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
e1fa6be7
...
@@ -149,7 +149,6 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
...
@@ -149,7 +149,6 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
ssb_index
],
txdataF
[
0
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
ssb_index
],
txdataF
[
0
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pbch
(
&
gNB
->
pbch
,
nr_generate_pbch
(
&
gNB
->
pbch
,
gNB
->
nrPolar_params
,
pbch_pdu
,
pbch_pdu
,
gNB
->
nr_pbch_interleaver
,
gNB
->
nr_pbch_interleaver
,
txdataF
[
0
],
txdataF
[
0
],
...
@@ -201,7 +200,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
...
@@ -201,7 +200,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if
(
nfapi_mode
==
0
||
nfapi_mode
==
1
){
if
(
nfapi_mode
==
0
||
nfapi_mode
==
1
){
nr_generate_dci_top
(
gNB
->
pdcch_vars
,
nr_generate_dci_top
(
gNB
->
pdcch_vars
,
&
gNB
->
nrPolar_params
,
gNB
->
nr_gold_pdcch_dmrs
[
slot
],
gNB
->
nr_gold_pdcch_dmrs
[
slot
],
gNB
->
common_vars
.
txdataF
[
0
],
gNB
->
common_vars
.
txdataF
[
0
],
AMP
,
*
fp
,
*
cfg
);
AMP
,
*
fp
,
*
cfg
);
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/rfsimulator/simulator.c
View file @
e1fa6be7
...
@@ -82,6 +82,17 @@ void removeCirBuf(rfsimulator_state_t *bridge, int sock) {
...
@@ -82,6 +82,17 @@ void removeCirBuf(rfsimulator_state_t *bridge, int sock) {
bridge
->
buf
[
sock
].
conn_sock
=-
1
;
bridge
->
buf
[
sock
].
conn_sock
=-
1
;
}
}
void
socketError
(
rfsimulator_state_t
*
bridge
,
int
sock
)
{
if
(
bridge
->
buf
[
sock
].
conn_sock
!=-
1
)
{
LOG_W
(
HW
,
"Lost socket
\n
"
);
removeCirBuf
(
bridge
,
sock
);
if
(
bridge
->
typeStamp
==
MAGICUE
)
exit
(
1
);
}
}
#define helpTxt "\
#define helpTxt "\
\x1b[31m\
\x1b[31m\
rfsimulator: error: you have to run one UE and one eNB\n\
rfsimulator: error: you have to run one UE and one eNB\n\
...
@@ -108,32 +119,28 @@ void setblocking(int sock, enum blocking_t active) {
...
@@ -108,32 +119,28 @@ void setblocking(int sock, enum blocking_t active) {
static
bool
flushInput
(
rfsimulator_state_t
*
t
);
static
bool
flushInput
(
rfsimulator_state_t
*
t
);
int
fullwrite
(
int
fd
,
void
*
_buf
,
int
count
,
rfsimulator_state_t
*
t
)
{
void
fullwrite
(
int
fd
,
void
*
_buf
,
int
count
,
rfsimulator_state_t
*
t
)
{
char
*
buf
=
_buf
;
char
*
buf
=
_buf
;
int
ret
=
0
;
int
l
;
int
l
;
setblocking
(
fd
,
notBlocking
);
setblocking
(
fd
,
notBlocking
);
while
(
count
)
{
while
(
count
)
{
l
=
write
(
fd
,
buf
,
count
);
l
=
write
(
fd
,
buf
,
count
);
if
(
l
<=
0
)
{
if
(
l
<=
0
)
{
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
continue
;
continue
;
if
(
errno
==
EAGAIN
)
{
if
(
errno
==
EAGAIN
)
{
flushInput
(
t
);
flushInput
(
t
);
continue
;
continue
;
}
}
else
else
return
;
return
-
1
;
}
}
count
-=
l
;
count
-=
l
;
buf
+=
l
;
buf
+=
l
;
ret
+=
l
;
}
}
return
ret
;
}
}
int
server_start
(
openair0_device
*
device
)
{
int
server_start
(
openair0_device
*
device
)
{
...
@@ -143,9 +150,12 @@ int server_start(openair0_device *device) {
...
@@ -143,9 +150,12 @@ int server_start(openair0_device *device) {
int
enable
=
1
;
int
enable
=
1
;
AssertFatal
(
setsockopt
(
t
->
listen_sock
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
enable
,
sizeof
(
int
))
==
0
,
""
);
AssertFatal
(
setsockopt
(
t
->
listen_sock
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
enable
,
sizeof
(
int
))
==
0
,
""
);
struct
sockaddr_in
addr
=
{
struct
sockaddr_in
addr
=
{
sin_family:
AF_INET
,
sin_family:
sin_port:
htons
(
PORT
),
AF_INET
,
sin_addr:
{
s_addr
:
INADDR_ANY
}
sin_port:
htons
(
PORT
),
sin_addr:
{
s_addr
:
INADDR_ANY
}
};
};
bind
(
t
->
listen_sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
bind
(
t
->
listen_sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
AssertFatal
(
listen
(
t
->
listen_sock
,
5
)
==
0
,
""
);
AssertFatal
(
listen
(
t
->
listen_sock
,
5
)
==
0
,
""
);
...
@@ -162,9 +172,12 @@ int start_ue(openair0_device *device) {
...
@@ -162,9 +172,12 @@ int start_ue(openair0_device *device) {
int
sock
;
int
sock
;
AssertFatal
((
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
>=
0
,
""
);
AssertFatal
((
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
>=
0
,
""
);
struct
sockaddr_in
addr
=
{
struct
sockaddr_in
addr
=
{
sin_family:
AF_INET
,
sin_family:
sin_port:
htons
(
PORT
),
AF_INET
,
sin_addr:
{
s_addr
:
INADDR_ANY
}
sin_port:
htons
(
PORT
),
sin_addr:
{
s_addr
:
INADDR_ANY
}
};
};
addr
.
sin_addr
.
s_addr
=
inet_addr
(
t
->
ip
);
addr
.
sin_addr
.
s_addr
=
inet_addr
(
t
->
ip
);
bool
connected
=
false
;
bool
connected
=
false
;
...
@@ -195,8 +208,7 @@ int rfsimulator_write(openair0_device *device, openair0_timestamp timestamp, voi
...
@@ -195,8 +208,7 @@ int rfsimulator_write(openair0_device *device, openair0_timestamp timestamp, voi
if
(
ptr
->
conn_sock
>=
0
)
{
if
(
ptr
->
conn_sock
>=
0
)
{
transferHeader
header
=
{
t
->
typeStamp
,
nsamps
,
nbAnt
,
timestamp
};
transferHeader
header
=
{
t
->
typeStamp
,
nsamps
,
nbAnt
,
timestamp
};
int
n
=-
1
;
fullwrite
(
ptr
->
conn_sock
,
&
header
,
sizeof
(
header
),
t
);
AssertFatal
(
fullwrite
(
ptr
->
conn_sock
,
&
header
,
sizeof
(
header
),
t
)
==
sizeof
(
header
),
""
);
sample_t
tmpSamples
[
nsamps
][
nbAnt
];
sample_t
tmpSamples
[
nsamps
][
nbAnt
];
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
...
@@ -206,13 +218,8 @@ int rfsimulator_write(openair0_device *device, openair0_timestamp timestamp, voi
...
@@ -206,13 +218,8 @@ int rfsimulator_write(openair0_device *device, openair0_timestamp timestamp, voi
tmpSamples
[
s
][
a
]
=
in
[
s
];
tmpSamples
[
s
][
a
]
=
in
[
s
];
}
}
n
=
fullwrite
(
ptr
->
conn_sock
,
(
void
*
)
tmpSamples
,
sampleToByte
(
nsamps
,
nbAnt
),
t
);
if
(
ptr
->
conn_sock
>=
0
)
fullwrite
(
ptr
->
conn_sock
,
(
void
*
)
tmpSamples
,
sampleToByte
(
nsamps
,
nbAnt
),
t
);
if
(
n
!=
sampleToByte
(
nsamps
,
nbAnt
)
)
{
LOG_E
(
HW
,
"rfsimulator: write error ret %d (wanted %ld) error %s
\n
"
,
n
,
sampleToByte
(
nsamps
,
nbAnt
),
strerror
(
errno
));
abort
();
}
}
}
}
}
...
@@ -241,17 +248,11 @@ static bool flushInput(rfsimulator_state_t *t) {
...
@@ -241,17 +248,11 @@ static bool flushInput(rfsimulator_state_t *t) {
int
conn_sock
;
int
conn_sock
;
AssertFatal
(
(
conn_sock
=
accept
(
t
->
listen_sock
,
NULL
,
NULL
))
!=
-
1
,
""
);
AssertFatal
(
(
conn_sock
=
accept
(
t
->
listen_sock
,
NULL
,
NULL
))
!=
-
1
,
""
);
setblocking
(
conn_sock
,
notBlocking
);
setblocking
(
conn_sock
,
notBlocking
);
allocCirBuf
(
t
,
conn_sock
);
allocCirBuf
(
t
,
conn_sock
);
LOG_I
(
HW
,
"A ue connected
\n
"
);
LOG_I
(
HW
,
"A ue connected
\n
"
);
}
else
{
}
else
{
if
(
events
[
nbEv
].
events
&
(
EPOLLHUP
|
EPOLLERR
|
EPOLLRDHUP
)
)
{
if
(
events
[
nbEv
].
events
&
(
EPOLLHUP
|
EPOLLERR
|
EPOLLRDHUP
)
)
{
LOG_W
(
HW
,
"Lost socket
\n
"
);
socketError
(
t
,
fd
);
removeCirBuf
(
t
,
fd
);
if
(
t
->
typeStamp
==
MAGICUE
)
exit
(
1
);
continue
;
continue
;
}
}
...
@@ -292,7 +293,8 @@ static bool flushInput(rfsimulator_state_t *t) {
...
@@ -292,7 +293,8 @@ static bool flushInput(rfsimulator_state_t *t) {
AssertFatal
(
(
t
->
typeStamp
==
MAGICUE
&&
b
->
th
.
magic
==
MAGICeNB
)
||
AssertFatal
(
(
t
->
typeStamp
==
MAGICUE
&&
b
->
th
.
magic
==
MAGICeNB
)
||
(
t
->
typeStamp
==
MAGICeNB
&&
b
->
th
.
magic
==
MAGICUE
),
"Socket Error in protocol"
);
(
t
->
typeStamp
==
MAGICeNB
&&
b
->
th
.
magic
==
MAGICUE
),
"Socket Error in protocol"
);
b
->
headerMode
=
false
;
b
->
headerMode
=
false
;
b
->
alreadyRead
=
true
;
b
->
alreadyRead
=
true
;
if
(
b
->
lastReceivedTS
!=
b
->
th
.
timestamp
)
{
if
(
b
->
lastReceivedTS
!=
b
->
th
.
timestamp
)
{
int
nbAnt
=
b
->
th
.
nbAnt
;
int
nbAnt
=
b
->
th
.
nbAnt
;
...
@@ -331,7 +333,10 @@ static bool flushInput(rfsimulator_state_t *t) {
...
@@ -331,7 +333,10 @@ static bool flushInput(rfsimulator_state_t *t) {
}
}
int
rfsimulator_read
(
openair0_device
*
device
,
openair0_timestamp
*
ptimestamp
,
void
**
samplesVoid
,
int
nsamps
,
int
nbAnt
)
{
int
rfsimulator_read
(
openair0_device
*
device
,
openair0_timestamp
*
ptimestamp
,
void
**
samplesVoid
,
int
nsamps
,
int
nbAnt
)
{
if
(
nbAnt
!=
1
)
{
LOG_E
(
HW
,
"rfsimulator: only 1 antenna tested
\n
"
);
exit
(
1
);
}
if
(
nbAnt
!=
1
)
{
LOG_E
(
HW
,
"rfsimulator: only 1 antenna tested
\n
"
);
exit
(
1
);
}
rfsimulator_state_t
*
t
=
device
->
priv
;
rfsimulator_state_t
*
t
=
device
->
priv
;
LOG_D
(
HW
,
"Enter rfsimulator_read, expect %d samples, will release at TS: %ld
\n
"
,
nsamps
,
t
->
nextTimestamp
+
nsamps
);
LOG_D
(
HW
,
"Enter rfsimulator_read, expect %d samples, will release at TS: %ld
\n
"
,
nsamps
,
t
->
nextTimestamp
+
nsamps
);
...
@@ -351,7 +356,6 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
...
@@ -351,7 +356,6 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
t
->
nextTimestamp
+=
nsamps
;
t
->
nextTimestamp
+=
nsamps
;
LOG_W
(
HW
,
"Generated void samples for Rx: %ld
\n
"
,
t
->
nextTimestamp
);
LOG_W
(
HW
,
"Generated void samples for Rx: %ld
\n
"
,
t
->
nextTimestamp
);
*
ptimestamp
=
t
->
nextTimestamp
-
nsamps
;
*
ptimestamp
=
t
->
nextTimestamp
-
nsamps
;
return
nsamps
;
return
nsamps
;
}
}
...
@@ -443,8 +447,8 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
...
@@ -443,8 +447,8 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
}
}
rfsimulator
->
typeStamp
=
strncasecmp
(
rfsimulator
->
ip
,
"enb"
,
3
)
==
0
?
rfsimulator
->
typeStamp
=
strncasecmp
(
rfsimulator
->
ip
,
"enb"
,
3
)
==
0
?
MAGICeNB:
MAGICeNB:
MAGICUE
;
MAGICUE
;
LOG_I
(
HW
,
"rfsimulator: running as %s
\n
"
,
rfsimulator
->
typeStamp
==
MAGICeNB
?
"eNB"
:
"UE"
);
LOG_I
(
HW
,
"rfsimulator: running as %s
\n
"
,
rfsimulator
->
typeStamp
==
MAGICeNB
?
"eNB"
:
"UE"
);
device
->
trx_start_func
=
rfsimulator
->
typeStamp
==
MAGICeNB
?
device
->
trx_start_func
=
rfsimulator
->
typeStamp
==
MAGICeNB
?
server_start
:
server_start
:
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/nr-ue.c
View file @
e1fa6be7
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