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
wangjie
OpenXG-RAN
Commits
61a2842d
Commit
61a2842d
authored
4 years ago
by
Francesco Mani
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ul_harq' into NR_UL_scheduling
parents
c810300e
414cc0ee
dev
1
128-ues
256_QAM_demod
512-dataplane-bug-in-l2nfapi_nos1
FR2_NSA
Fix_SA_SIB1
NR-PHY-MAC-IF-multi-UE
NRPRACH_highSpeed_saankhya
NRUE_usedlschparallel
NR_10MHz
NR_2port_CSIRS
NR_CSIRS_tomerge
NR_CSI_reporting
NR_DLUL_PF
NR_DLUL_PF_4UL
NR_DLUL_PF_rebased
NR_DL_MIMO
NR_DL_sched_fixes
NR_DL_scheduler
NR_F1C_F1U_extensions
NR_FAPI_beamindex_SSB_RO
NR_FAPI_beamindex_SSB_RO_SEMPROJ
NR_FDD_FIX
NR_FR2_RA
NR_FR2_RRC_SSB
NR_FR2_initsync_fixes
NR_MAC_Multi_Rach_GlobalEdge
NR_MAC_Multi_Rach_GlobalEdge-old
NR_MAC_SSB
NR_MAC_SSB_RO_GlobalEdge
NR_MAC_SSB_RO_UE_IDCC
NR_MAC_SSB_RO_merge
NR_MAC_TCI_UCI_GlobalEdge
NR_MCS_BLER
NR_NGAP
NR_PUCCH_MultiUE
NR_RA_cleanup
NR_RA_updates
NR_RRCConfiguration_FR2
NR_RRCReconfiguration_BWP
NR_RRC_PDCP
NR_SA_F1AP_5GRECORDS
NR_SA_F1AP_5GRECORDS-USIM
NR_SA_F1AP_5GRECORDS-wf-0623
NR_SA_F1AP_5GRECORDS_lts
NR_SA_F1AP_RFSIMULATOR
NR_SA_F1AP_RFSIMULATOR2
NR_SA_F1AP_RFSIMULATOR2_SRB
NR_SA_F1AP_RFSIMULATOR3
NR_SA_F1AP_RFSIMULATOR3_tmp
NR_SA_F1AP_RFSIMULATOR3_wf
NR_SA_F1AP_RFSIMULATOR_w5GCN
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_SA_w5GCN_new_gtpu
NR_SCHED_HARQ
NR_SCHED_PDCCH_PUCCH_HARQ
NR_SCHED_PDCCH_PUCCH_HARQ_rebased
NR_SCHED_fixes
NR_SRB_Config
NR_UE_CONFIG_REQ_FIXES
NR_UE_MAC_scheduler
NR_UE_PUCCH_bugfixes
NR_UE_RA_fixes
NR_UE_SA
NR_UE_SSB_meas
NR_UE_UL_DCI_improvements
NR_UE_dlsch_bugfix
NR_UE_enable_parallelization
NR_UE_rework_test
NR_UE_reworking_UCI_procedures
NR_UE_stability_fixes
NR_UL_SCFDMA_100MHz
NR_UL_scheduler
NR_UL_scheduler_rebased
NR_UL_scheduling
NR_Wireshark
NR_beam_simulation
NR_cleanup_PUCCH_resources
NR_gNB_initial_MIB_fix
NR_mac_uci_functions_rework
NR_multiplexing_HARQ_CSI_PUCCH
NR_new_ul_antennaports
NR_phytest_bugfixes
NR_reworking_UL_antennaports
NR_scheduling_CSIRS
NR_scheduling_request
NR_scheduling_request2
NR_scheduling_request3
PBCHNRTCFIX
PUSCH_TA_update
RA_CI_test
RFquality
Saankhya_NRPRACH_HighSpeed
Test_SA_5GREC
UE_DL_DCI_hotfix
add-dmrs-test
add-ru-docker-image
avxllr
bandwidth-testing
bch-fixes-bitmap
benetel_5g_prach_fix
benetel_config_file_fix
benetel_dpdk20
benetel_driver_uldl_pf_merge
benetel_driver_update
benetel_fixes
benetel_phase_rotation
benetel_phase_rotation_old
bsr-fix
bugfix-free-ra-process
bugfix-nr-bands
bugfix-nr-ldpc-post-processing
bugfix-nr-ldpc-size-typo
bugfix-nr-pdcp-sn-size
bugfix-nr-rate-matching-assertion
bugfix-nr-t-reordering
bugfix-x2-SgNBAdditionRequest
bugfix_gnb_rt_stats_html
bupt-sa-merge
cce_indexing_fix
cce_indexing_fix2
ci-add-sabox-support
ci-deploy-asterix
ci-deploy-docker-compose
ci-fix-module-ul-iperf
ci-new-docker-pipeline
ci-reduce-nb-vms
ci-test
ci-ul-iperf-from-trf-container
ci_benetel_longrun_limits
ci_benetel_test
ci_fix_iperf_for_module
ci_hotfix_module_ue_ip_address
ci_improve_module_ctl
ci_nsa_2x2_implem
ci_nsa_benetel
ci_nsa_fixes
ci_nsa_pipes_improve
ci_nsa_test_integration_2021_wk19
ci_nsa_traces
ci_nsa_uplink
ci_phytest
ci_quectel_support
ci_sa_rfsim_test
ci_solve_ul_for_module
ci_test_5GREC
ci_test_nsa_2x2
ci_test_nsa_fix_quectel_nic
ci_test_nsa_on_develop
ci_test_ra_fr2
ci_testinfra_as_code
ci_update_build_nasmesh
ci_vm_resource_fix
cleanup_softmodem_main
code-cleanup-20210716
constant_power
debug-UL-5GRECORDS
debug_UL_signal
detached-w16-test
develop
develop-CBRA-v3
develop-CCE
develop-NR_SA_F1AP_5GRECORDS
develop-NR_SA_F1AP_5GRECORDS-abs
develop-NR_SA_F1AP_5GRECORDS-hs
develop-NR_SA_F1AP_5GRECORDS-hs1
develop-NR_SA_F1AP_5GRECORDS-lts
develop-NR_SA_F1AP_5GRECORDS-lts-wf
develop-NR_SA_F1AP_5GRECORDS-v3
develop-NR_SA_F1AP_5GRECORDS_100M
develop-NR_SA_F1AP_5GRECORDS_LDPC_FPGA
develop-NR_SA_F1AP_5GRECORDS_lfq_0607
develop-NSA_SA_fixes
develop-SA-CBRA
develop-SA-CBRA-CUDU
develop-SA-CBRA-Msg5
develop-SA-CBRA-lts
develop-SA-CBRA-ulsch-lts
develop-SA-RA
develop-SnT
develop-aw2sori
develop-oriecpriupdates
develop-sib1
develop-sib1-local
develop-sib1-lts
develop-sib1-update
develop-sib1-update-test1
develop-sib1-update-ue
develop-wf-du
develop_fpga_ldpc
develop_stable
dfts_alternatives
disable_CSI_measrep
dlsch_encode_mthread
dlsch_parallel
docker-improvements-2021-april
docker-no-cache-option
dongzhanyi-zte-develop1
dongzhanyi-zte-develop2
enhance-rfsim
episys-merge
episys/nsa_baseline
episys/nsa_development
feature/make-s1-mme-port-configurable
feature/make-s1-mme-port-configurable-with-astyle-fixes
fedora-gen-kernel-fix
fft_bench_hotfix
finalize-oaicn-integration
fix-check
fix-ci-tun
fix-compile
fix-itti-segv
fix-lte-ue-modem-in-docker-container
fix-nr-pdcp-timer
fix-nr-rlc-range-nack
fix-physim-deploy
fix-physim-run-script-on-cluster
fix-quectel
fix-realtime
fix-retransmission-rbg
fix-x2-without-gnb
fix_NR_DLUL_PF
fix_NR_DLUL_PF_benchmark
fix_coreset_dmrs_idx
fix_do_ra_data
fix_nr_ulsim
fix_pdsch_low_prb
fix_rb_corruption
fix_reestablishment
fix_rrc_x2_ticking
fixes-CE-RLC-PDU-size
fixes-mac-sched-nfapi
fixes-mac-sched-tun
fixes-tun
fixgtpu
flexran-apps
flexran-repair-mme-mgmt
flexran-rtc-repo-is-public
fujitsu_lte_contribution
fujitsu_lte_contribution-128
git-dashboard
gnb-freerun-txru
gnb-n300-fixes
gnb-only-test
gnb-realtime-hotfix
gnb-realtime-quickfix
gnb-threadpool
hack-bch-no-sched-sf-0
hack-exit-gnb-when-no-enb-nsa
harq-hotfix
hotfix-minor-remove-nr-rlc-cppcheck-error
hotfix-nr-rlc-tick
integ-w13-test-rt-issue
integration_2020_wk15
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
integration_2021_wk04
integration_2021_wk05
integration_2021_wk06
integration_2021_wk06_MR978
integration_2021_wk06_b
integration_2021_wk06_c
integration_2021_wk08
integration_2021_wk08_2
integration_2021_wk08_MR963
integration_2021_wk09
integration_2021_wk09_b
integration_2021_wk10
integration_2021_wk10_b
integration_2021_wk11
integration_2021_wk12
integration_2021_wk12_b
integration_2021_wk13_a
integration_2021_wk13_b
integration_2021_wk13_b_fix_tdas
integration_2021_wk13_b_fixed
integration_2021_wk13_c
integration_2021_wk14_a
integration_2021_wk15_a
integration_2021_wk16
integration_2021_wk17_a
integration_2021_wk17_b
integration_2021_wk18_a
integration_2021_wk18_b
integration_2021_wk19
integration_2021_wk20_a
integration_2021_wk22
integration_2021_wk23
integration_2021_wk27
integration_2021_wk28
integration_2021_wk30
integration_2021_wk30_b
integration_w5GC_CBRA_test
inter-RRU-final
itti-enhancement
ldpc-decoder-codegen2
ldpc_offload_t1
ldpc_short_codeword_fixes
load_gnb
lte-ulsch-bugfix
lte_uplink_improvement
mac-fixes-wk45_2
migrate-cpp-check-container
migrate-vm-pipeline-to-bionic
minor-fix-doc-basic-sim
mosaic5g-oai-ran
mosaic5g-oai-sim
msg4_phy_0303_lfq
multiple_ssb_sib1_bugfix
nasmesh_kernel_5.8
new-gtpu
nfapi_nr_arch_mod
nfapi_nr_develop
nfapi_nr_develop_new
ngap-dlul
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-bsr-fix
nr-dl-mimo-2layer
nr-dmrs-fixes
nr-mac-pdu-wireshark
nr-mac-remove-ue-list
nr-pdcp-benchmarking
nr-pdcp-improvements
nr-pdcp-nea2-security
nr-pdcp-nia2-integrity
nr-pdcp-small-bugfixes
nr-pdcp-srb-integrity
nr-ra-fix
nr-rlc-am-bugfix-w44
nr-rlc-bugfix-w44
nr-stats-print
nrPBCHTCFix
nrPbchTcFix
nrUE
nrUE-hs
nrUE-upper-layer
nr_bsr
nr_dl_dmrs_type2
nr_dl_pf
nr_dl_pf2
nr_dl_ul_ptrs
nr_fdd_if_fix
nr_improve_chanest
nr_power_measurement_fixes
nr_prach_fr2
nr_ue_msg3
nr_ue_pdcp_fix
nr_ue_remove_high_speed_flag
nr_ue_tti_cleanup
nr_ul_pf
nr_ul_scfdma
nsa-ue
nsa_remove_band_hardcodings
oai-sim
oairu
oairu-dockerfile-support
oc-docker-october-improvements
openxg/develop
phy-asan-fixes
physim-build-deploy
physim-deploy-handle-error-cases
prb_based_dl_channel_estimation
ptrs_rrc_config
pusch-mthread-scaling-fix
pusch-retrans-fix-ue
ra-dl-ul
recursive-cmake
remove_nos1_hack_pdcp
remove_x2_gnb_hardcoding
repair-TA
revert_memcpy
rh-ci-add-ue-parallelization
rh_ci_add_runtime_stats
rh_ci_add_uldlharq_stats
rh_ci_fix_autoterminate
rh_ci_fr1_update
rh_ci_gsheet_rt_monitoring
rh_ci_nsa2jenkins
rh_ci_nsa_test_n310
rh_ci_oc
rh_ci_phy_test_improve
rh_ci_py
rh_ci_ra_fr2
rh_ci_rfsim_ra
rh_ci_test_benetel
rh_ci_test_nsa
rh_ci_test_nsa_wk16
rh_ci_test_nsa_wk17_b
rh_ci_test_nsa_wk17b
rh_ci_test_rfsim_sa
rh_ci_ue_parallel
rh_fr1_newjenkins
rh_fr1_update
rh_gnb_compile_fix
rh_wk50_debug
rlc-v2-bugfix-status-reporting
rlc-v2-tick
rohan_ulsim2RxFix
rrc-enb-phy-testmode
s1-subnormal_rewrite
s1_subnormal
s1_subnormal-robert
s1ap-bugfix-rab_setup
sa-demo
sa-demo-hs
sa-merge-rrc-srb
sa-msg4
sa-msg4-rrc
sa-msg4-rrc-yihz
sa-msg4-rrc-yihz-hs
sa_rrc_yihz
sanitize-address
sanitize-v1
sanitize-v1-tmp
sarma_pvnp_oai
scs_60_iisc
sim-channels
small-bugfixes-w40
small-config-change
small_nr_bugfixes
t-gnb-tracer
test-5GREC
test-nsa-benetel
test-panos
test_nsa_gtpu_fix
test_rt-fix_phy-test
testing_with_external_txdata
ue-dci-false-detection
ue-fixes
ue-pdsch-pusch-parallel
ue-race-fix
ue_beam_selection
ul-freq-iq-samps-to-file
ul_dl_dci_same_slot
ulsch_decode_mthread
ulsim_changes
usrp_stop_cleanly
usrp_x400
wf-sa-rrc
wf_testc
wireshark-T-hack-ueid
wireshark-log-scheduling-requests
wk11-with-phytest
x2-endc-processing
x2_handle_sctp_shutdown
xiangwab
xiangwan
xw2
yihongzheng_srb
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
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
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
No related merge requests found
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
161 additions
and
52 deletions
+161
-52
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+2
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+2
-4
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+1
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+2
-5
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+1
-1
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+3
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+10
-7
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+2
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+33
-20
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+39
-5
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+3
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+14
-0
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+42
-4
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
61a2842d
...
...
@@ -348,6 +348,8 @@ int nr_dlsch_encoding(unsigned char *a,
float
Coderate
=
0
.
0
;
uint8_t
Nl
=
4
;
dlsch
->
harq_processes
[
harq_pid
]
->
round
=
nr_rv_round_map
[
rel15
->
rvIndex
[
0
]];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING
,
VCD_FUNCTION_IN
);
A
=
rel15
->
TBSize
[
0
]
<<
3
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
61a2842d
...
...
@@ -359,6 +359,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING
,
1
);
harq_process
->
TBS
=
pusch_pdu
->
pusch_data
.
tb_size
;
harq_process
->
round
=
nr_rv_round_map
[
pusch_pdu
->
pusch_data
.
rv_index
];
A
=
(
harq_process
->
TBS
)
<<
3
;
ret
=
ulsch
->
max_ldpc_iterations
+
1
;
...
...
@@ -570,7 +571,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
AssertFatal
(
kc
!=
255
,
""
);
j
+=
(
harq_process
->
F
>>
3
);
// for (i=Kr_bytes,j=K_bytes_F-((2*p_decParams->Z)>>3); i < ((kc*p_decParams->Z)>>3); i++, j++) {
for
(
i
=
Kr_bytes
;
i
<
((
kc
*
p_decParams
->
Z
)
>>
3
);
i
++
,
j
++
)
{
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
harq_process
->
d
[
r
][
8
*
j
]));
}
...
...
@@ -661,8 +661,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
harq_process
->
status
=
SCH_IDLE
;
harq_process
->
round
=
0
;
harq_process
->
handled
=
0
;
ulsch
->
harq_mask
&=
~
(
1
<<
harq_pid
);
}
ulsch
->
harq_mask
&=
~
(
1
<<
harq_pid
);
// LOG_D(PHY,"[gNB %d] ULSCH: Setting NACK for nr_tti_rx %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
// phy_vars_gNB->Mod_id,nr_tti_rx,harq_pid,harq_process->status,harq_process->round,ulsch->Mlimit,harq_process->TBS);
...
...
@@ -680,7 +680,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
harq_process
->
status
=
SCH_IDLE
;
harq_process
->
round
=
0
;
// harq_process->handled = 0;
ulsch
->
harq_mask
|=
(
1
<<
harq_pid
);
ulsch
->
harq_mask
&=
~
(
1
<<
harq_pid
);
// harq_process->harq_ack.ack = 1;
// harq_process->harq_ack.harq_id = harq_pid;
// harq_process->harq_ack.send_harq_status = 1;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
61a2842d
...
...
@@ -277,7 +277,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
vcd_signal_dumper_dump_function_by_name
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_IN
);
//NR_DL_UE_HARQ_t *harq_process = dlsch->harq_processes[0];
if
(
!
dlsch_llr
)
{
...
...
@@ -657,7 +657,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
harq_ack
.
harq_id
=
harq_pid
;
harq_process
->
harq_ack
.
send_harq_status
=
1
;
harq_process
->
errors
[
harq_process
->
round
]
++
;
//
harq_process->round++; // [hna] uncomment this line when HARQ is implemented
harq_process
->
round
++
;
// [hna] uncomment this line when HARQ is implemented
// printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if
(
harq_process
->
round
>=
dlsch
->
Mlimit
)
{
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
61a2842d
...
...
@@ -1074,11 +1074,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
*/
uint8_t
nr_ue_pusch_common_procedures
(
PHY_VARS_NR_UE
*
UE
,
uint8_t
harq_pid
,
uint8_t
slot
,
uint8_t
thread_id
,
uint8_t
gNB_id
,
NR_DL_FRAME_PARMS
*
frame_parms
);
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
Nl
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
61a2842d
...
...
@@ -259,6 +259,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Ilbrm
=
0
;
Tbslbrm
=
950984
;
//max tbs
Coderate
=
0
.
0
;
harq_process
->
round
=
nr_rv_round_map_ue
[
harq_process
->
pusch_pdu
.
pusch_data
.
rv_index
];
///////////
/////////////////////////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
61a2842d
...
...
@@ -476,17 +476,14 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint8_t
nr_ue_pusch_common_procedures
(
PHY_VARS_NR_UE
*
UE
,
uint8_t
harq_pid
,
uint8_t
slot
,
uint8_t
thread_id
,
uint8_t
gNB_id
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
Nl
)
{
int
tx_offset
,
ap
;
int32_t
**
txdata
;
int32_t
**
txdataF
;
int
timing_advance
;
uint8_t
Nl
=
UE
->
ulsch
[
thread_id
][
gNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
pusch_pdu
.
nrOfLayers
;
// cw 0
/////////////////////////IFFT///////////////////////
///////////
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
61a2842d
...
...
@@ -113,7 +113,7 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
// if frequency hopping is enabled n_hop = 1 for second hop. Not sure frequency hopping concerns format 0. FIXME!!!
// if ((PUCCH_Frequency_Hopping == 1)&&(l == (nrofSymbols-1))) n_hop = 1;
nr_group_sequence_hopping
(
pucch_GroupHopping
,
hoppingId
,
n_hop
,
nr_tti_tx
,
&
u
,
&
v
);
// calculating u and v value
alpha
=
nr_cyclic_shift_hopping
(
ue
->
pucch_config_common_nr
->
hoppingId
,
m0
,
mcs
,
l
,
startingSymbolIndex
,
nr_tti_tx
);
alpha
=
nr_cyclic_shift_hopping
(
hoppingId
,
m0
,
mcs
,
l
,
startingSymbolIndex
,
nr_tti_tx
);
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch0] sequence generation
\t
u=%d
\t
v=%d
\t
alpha=%lf
\t
(for symbol l=%d)
\n
"
,
u
,
v
,
alpha
,
l
);
#endif
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_nr_common.h
View file @
61a2842d
...
...
@@ -111,6 +111,9 @@
#define MAX_NUM_NR_CHANNEL_BITS (14*273*12*8) // 14 symbols, 273 RB
#define MAX_NUM_NR_RE (14*273*12)
extern
const
uint8_t
nr_rv_round_map
[
4
];
extern
const
uint8_t
nr_rv_round_map_ue
[
4
];
typedef
enum
{
NR_MU_0
=
0
,
NR_MU_1
,
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
61a2842d
...
...
@@ -460,7 +460,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
for
(
uint8_t
symbol
=
symbol_start
;
symbol
<
symbol_end
;
symbol
++
)
{
no_sig
=
nr_rx_pusch
(
gNB
,
ULSCH_id
,
frame_rx
,
slot_rx
,
symbol
,
harq_pid
);
if
(
no_sig
)
{
LOG_I
(
PHY
,
"ULSCH %d not received
\n
"
,
ULSCH_id
);
LOG_I
(
PHY
,
"PUSCH not detected in symbol %d
\n
"
,
symbol
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
61a2842d
...
...
@@ -86,6 +86,8 @@ fifo_dump_emos_UE emos_dump_UE;
char
nr_mode_string
[
4
][
20
]
=
{
"NOT SYNCHED"
,
"PRACH"
,
"RAR"
,
"PUSCH"
};
const
uint8_t
nr_rv_round_map_ue
[
4
]
=
{
0
,
2
,
1
,
3
};
extern
double
cpuf
;
/*
...
...
@@ -2250,20 +2252,18 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
*/
if
(
get_softmodem_params
()
->
usim_test
==
0
)
{
LOG_
D
(
PHY
,
"Send
ing PUCCH
\n
"
);
LOG_
I
(
PHY
,
"Generat
ing PUCCH
\n
"
);
pucch_procedures_ue_nr
(
ue
,
gNB_id
,
proc
,
TRU
E
);
FALS
E
);
}
LOG_
D
(
PHY
,
"Sending
data
\n
"
);
LOG_
I
(
PHY
,
"Sending Uplink
data
\n
"
);
nr_ue_pusch_common_procedures
(
ue
,
harq_pid
,
slot_tx
,
thread_id
,
gNB_id
,
&
ue
->
frame_parms
);
&
ue
->
frame_parms
,
1
);
//ue->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid]->pusch_pdu.nrOfLayers);
}
//LOG_M("txdata.m","txs",ue->common_vars.txdata[0],1228800,1,1);
...
...
@@ -3371,6 +3371,9 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
}
}
// exit dlsch procedures as there are no active dlsch
if
(
is_cw0_active
!=
ACTIVE
&&
is_cw1_active
!=
ACTIVE
)
return
;
// start ldpc decode for CW 0
dlsch0
->
harq_processes
[
harq_pid
]
->
G
=
nr_get_G
(
dlsch0
->
harq_processes
[
harq_pid
]
->
nb_rb
,
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
61a2842d
...
...
@@ -55,6 +55,8 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double
cpuf
;
uint8_t
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
uint8_t
const
nr_rv_round_map
[
4
]
=
{
0
,
2
,
1
,
3
};
uint8_t
const
nr_rv_round_map_ue
[
4
]
=
{
0
,
2
,
1
,
3
};
// needed for some functions
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{{
NULL
}};
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
61a2842d
...
...
@@ -104,7 +104,7 @@ int rrc_init_nr_global_param(void){return(0);}
// needed for some functions
uint16_t
n_rnti
=
0x1234
;
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
uint8_t
round_rv_map
[
4
]
=
{
1
,
0
,
2
,
3
};
//const uint8_t nr_rv_round_map[4] = {0, 2, 1, 3};
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -148,6 +148,10 @@ int main(int argc, char **argv)
cpuf
=
get_cpu_freq_GHz
();
int
msg3_flag
=
0
;
uint8_t
rv_index
=
0
;
float
roundStats
[
50
];
float
effRate
;
float
eff_tp_check
=
0
.
7
;
uint8_t
snrRun
;
UE_nr_rxtx_proc_t
UE_proc
;
FILE
*
scg_fd
=
NULL
;
...
...
@@ -276,6 +280,9 @@ int main(int argc, char **argv)
printf
(
"Setting SNR0 to %f
\n
"
,
snr0
);
break
;
case
't'
:
eff_tp_check
=
(
float
)
atoi
(
optarg
)
/
100
;
break
;
/*
case 'r':
ricean_factor = pow(10,-.1*atof(optarg));
...
...
@@ -374,6 +381,7 @@ int main(int argc, char **argv)
printf
(
"-N Nid_cell
\n
"
);
printf
(
"-O oversampling factor (1,2,4,8,16)
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-t Acceptable effective throughput (in percentage)
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
printf
(
"-P Print ULSCH performances
\n
"
);
exit
(
-
1
);
...
...
@@ -559,6 +567,7 @@ int main(int argc, char **argv)
uint8_t
mcs_table
=
0
;
uint16_t
pdu_bit_map
=
PUSCH_PDU_BITMAP_PUSCH_DATA
;
// | PUSCH_PDU_BITMAP_PUSCH_PTRS;
uint8_t
max_rounds
=
4
;
uint8_t
crc_status
=
0
;
uint8_t
length_dmrs
=
pusch_len1
;
// [hna] remove dmrs struct
uint16_t
l_prime_mask
=
get_l_prime
(
nb_symb_sch
,
typeB
,
pusch_dmrs_pos0
,
length_dmrs
);
// [hna] remove dmrs struct
...
...
@@ -578,17 +587,23 @@ int main(int argc, char **argv)
printf
(
"
\n
"
);
//for (int i=0;i<16;i++) printf("%f\n",gaussdouble(0.0,1.0));
snrRun
=
0
;
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
snr_step
)
{
varArray_t
*
table_rx
=
initVarArray
(
1000
,
sizeof
(
double
));
int
error_flag
=
0
;
n_false_positive
=
0
;
effRate
=
0
;
n_errors
=
0
;
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
uint8_t
round
=
0
;
int
error_flag
;
gNB
->
ulsch
[
0
][
0
]
->
harq_mask
=
0
;
while
(
round
<
max_rounds
&&
!
(
gNB
->
ulsch
[
0
][
0
]
->
harq_mask
&
0x1
))
{
crc_status
=
1
;
errors_scrambling
=
0
;
errors_decoding
=
0
;
while
(
round
<
max_rounds
&&
crc_status
)
{
ulsch_ue
[
0
]
->
harq_processes
[
harq_pid
]
->
round
=
round
;
gNB
->
ulsch
[
0
][
0
]
->
harq_processes
[
harq_pid
]
->
round
=
round
;
rv_index
=
round_rv
_map
[
round
];
rv_index
=
nr_rv_round
_map
[
round
];
reset_meas
(
&
gNB
->
phy_proc_rx
);
reset_meas
(
&
gNB
->
ulsch_decoding_stats
);
reset_meas
(
&
gNB
->
ulsch_deinterleaving_stats
);
...
...
@@ -732,7 +747,6 @@ int main(int argc, char **argv)
if
(
input_fd
==
NULL
)
{
if
(
SNR
==
snr0
)
{
// set FAPI parameters for UE, put them in the scheduled response and call
nr_ue_scheduled_response
(
&
scheduled_response
);
...
...
@@ -757,24 +771,14 @@ int main(int argc, char **argv)
txlev_float
=
(
double
)
txlev
/
scale
;
// output of signal_energy is fixed point representation
//AWGN
}
}
else
n_trials
=
1
;
sigma_dB
=
10
*
log10
(
txlev_float
)
-
SNR
;
sigma
=
pow
(
10
,
sigma_dB
/
10
);
printf
(
"txlev_float %f, sigma_dB %f
\n
"
,
10
*
log10
(
txlev_float
),
sigma_dB
);
n_errors
=
0
;
n_false_positive
=
0
;
errors_scrambling
=
0
;
errors_decoding
=
0
;
if
(
n_trials
==
1
)
printf
(
"txlev_float %f, sigma_dB %f
\n
"
,
10
*
log10
(
txlev_float
),
sigma_dB
);
error_flag
=
0
;
//----------------------------------------------------------
//------------------------ add noise -----------------------
//----------------------------------------------------------
...
...
@@ -841,8 +845,11 @@ int main(int argc, char **argv)
gNB
->
ulsch
[
0
][
0
]
->
max_ldpc_iterations
+
1
)
{
error_flag
=
1
;
n_errors
++
;
}
printf
(
"end of round %d rv_index %d
\n
"
,
round
,
rv_index
);
crc_status
=
1
;
}
else
{
crc_status
=
0
;
}
if
(
n_trials
==
1
)
printf
(
"end of round %d rv_index %d
\n
"
,
round
,
rv_index
);
round
++
;
}
// round
...
...
@@ -892,12 +899,17 @@ int main(int argc, char **argv)
if
(
n_trials
==
1
)
printf
(
"
\x1B
[31m""[frame %d][trial %d]
\t
number of errors in decoding = %u
\n
"
"
\x1B
[0m"
,
frame
,
trial
,
errors_decoding
);
}
roundStats
[
snrRun
]
+=
((
float
)
round
);
if
(
!
crc_status
)
effRate
+=
((
float
)
TBS
)
/
round
;
}
// trial loop
roundStats
[
snrRun
]
/=
((
float
)
n_trials
);
effRate
/=
n_trials
;
printf
(
"*****************************************
\n
"
);
printf
(
"SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %u/%u
\n
"
,
SNR
,
n_errors
,
n_trials
,
n_false_positive
,
n_trials
,
errors_scrambling
,
available_bits
*
n_trials
);
printf
(
"
\n
"
);
printf
(
"SNR %f: Channel BLER %e, Channel BER %e
\n
"
,
SNR
,(
double
)
n_errors
/
n_trials
,(
double
)
errors_scrambling
/
available_bits
/
n_trials
);
printf
(
"SNR %f: Channel BLER %e, Channel BER %e
Avg round %.2f, Eff Rate %.4f bits/slot, Eff Throughput %.2f, TBS %d bits/slot
\n
"
,
SNR
,(
double
)
n_errors
/
n_trials
,(
double
)
errors_scrambling
/
available_bits
/
n_trials
,
roundStats
[
snrRun
],
effRate
,
effRate
/
TBS
*
100
,
TBS
);
printf
(
"*****************************************
\n
"
);
printf
(
"
\n
"
);
...
...
@@ -925,6 +937,7 @@ int main(int argc, char **argv)
break
;
}
snrRun
++
;
}
// SNR loop
printf
(
"
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
61a2842d
...
...
@@ -53,7 +53,10 @@
#include "NR_SearchSpace.h"
#include "NR_ControlResourceSet.h"
#define UL_HARQ_PRINT
extern
RAN_CONTEXT_t
RC
;
const
uint8_t
nr_rv_round_map
[
4
]
=
{
0
,
2
,
1
,
3
};
//#define ENABLE_MAC_PAYLOAD_DEBUG 1
//uint8_t mac_pdu[MAX_NR_DLSCH_PAYLOAD_BYTES];
...
...
@@ -269,7 +272,6 @@ int configure_fapi_dl_pdu(int Mod_idP,
int
TBS
;
int
bwp_id
=
1
;
int
UE_id
=
0
;
uint8_t
rv_round_map
[
4
]
=
{
0
,
2
,
3
,
1
};
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
...
...
@@ -315,7 +317,7 @@ int configure_fapi_dl_pdu(int Mod_idP,
pdsch_pdu_rel15
->
qamModOrder
[
0
]
=
2
;
pdsch_pdu_rel15
->
mcsIndex
[
0
]
=
mcs
;
pdsch_pdu_rel15
->
mcsTable
[
0
]
=
0
;
pdsch_pdu_rel15
->
rvIndex
[
0
]
=
(
get_softmodem_params
()
->
phy_test
==
1
)
?
0
:
rv_round_map
[
UE_list
->
UE_sched_ctrl
[
UE_id
].
harq_processes
[
current_harq_pid
].
round
];
pdsch_pdu_rel15
->
rvIndex
[
0
]
=
nr_
rv_round_map
[
UE_list
->
UE_sched_ctrl
[
UE_id
].
harq_processes
[
current_harq_pid
].
round
];
pdsch_pdu_rel15
->
dataScramblingId
=
*
scc
->
physCellId
;
pdsch_pdu_rel15
->
nrOfLayers
=
1
;
pdsch_pdu_rel15
->
transmissionScheme
=
0
;
...
...
@@ -774,6 +776,33 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
}
uint8_t
select_ul_harq_pid
(
NR_UE_sched_ctrl_t
*
sched_ctrl
)
{
uint8_t
hrq_id
;
uint8_t
max_ul_harq_pids
=
3
;
// temp: for testing
// schedule active harq processes
NR_UE_ul_harq_t
cur_harq
;
for
(
hrq_id
=
0
;
hrq_id
<
max_ul_harq_pids
;
hrq_id
++
)
{
cur_harq
=
sched_ctrl
->
ul_harq_processes
[
hrq_id
];
if
(
cur_harq
.
state
==
ACTIVE_NOT_SCHED
)
{
#ifdef UL_HARQ_PRINT
printf
(
"[SCHED] Found active ulharq id %d, scheduling it for retransmission
\n
"
,
hrq_id
);
#endif
return
hrq_id
;
}
}
// schedule new harq processes
for
(
hrq_id
=
0
;
hrq_id
<
max_ul_harq_pids
;
hrq_id
++
)
{
cur_harq
=
sched_ctrl
->
ul_harq_processes
[
hrq_id
];
if
(
cur_harq
.
state
==
INACTIVE
)
{
#ifdef UL_HARQ_PRINT
printf
(
"[SCHED] Found inactive ulharq id %d, scheduling it
\n
"
,
hrq_id
);
#endif
return
hrq_id
;
}
}
}
void
schedule_fapi_ul_pdu
(
int
Mod_idP
,
frame_t
frameP
,
...
...
@@ -978,9 +1007,14 @@ void schedule_fapi_ul_pdu(int Mod_idP,
//Pusch Allocation in frequency domain [TS38.214, sec 6.1.2.2]
//Optional Data only included if indicated in pduBitmap
// TODO from harq function as in pdsch
pusch_pdu
->
pusch_data
.
rv_index
=
0
;
pusch_pdu
->
pusch_data
.
harq_process_id
=
0
;
pusch_pdu
->
pusch_data
.
new_data_indicator
=
1
;
uint8_t
harq_id
=
select_ul_harq_pid
(
&
UE_list
->
UE_sched_ctrl
[
UE_id
]);
NR_UE_ul_harq_t
*
cur_harq
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_harq_processes
[
harq_id
];
pusch_pdu
->
pusch_data
.
harq_process_id
=
harq_id
;
pusch_pdu
->
pusch_data
.
new_data_indicator
=
cur_harq
->
ndi
;
pusch_pdu
->
pusch_data
.
rv_index
=
nr_rv_round_map
[
cur_harq
->
round
];
cur_harq
->
state
=
ACTIVE_SCHED
;
cur_harq
->
last_tx_slot
=
pusch_sched
->
slot
;
uint8_t
num_dmrs_symb
=
0
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
61a2842d
...
...
@@ -117,6 +117,9 @@ void mac_top_init_gNB(void)
UE_list
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
round
=
0
;
UE_list
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
ndi
=
0
;
UE_list
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
is_waiting
=
0
;
UE_list
->
UE_sched_ctrl
[
list_el
].
ul_harq_processes
[
list_harq
].
round
=
0
;
UE_list
->
UE_sched_ctrl
[
list_el
].
ul_harq_processes
[
list_harq
].
ndi
=
0
;
UE_list
->
UE_sched_ctrl
[
list_el
].
ul_harq_processes
[
list_harq
].
state
=
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
61a2842d
...
...
@@ -267,6 +267,19 @@ typedef struct NR_UE_harq {
uint16_t
feedback_slot
;
}
NR_UE_harq_t
;
typedef
enum
{
INACTIVE
=
0
,
ACTIVE_NOT_SCHED
,
ACTIVE_SCHED
}
NR_UL_harq_states_t
;
typedef
struct
NR_UE_ul_harq
{
uint8_t
ndi
;
uint8_t
round
;
uint16_t
last_tx_slot
;
NR_UL_harq_states_t
state
;
}
NR_UE_ul_harq_t
;
/*! \brief scheduling control information set through an API */
typedef
struct
{
uint64_t
dlsch_in_slot_bitmap
;
// static bitmap signaling which slot in a tdd period contains dlsch
...
...
@@ -277,6 +290,7 @@ typedef struct {
int16_t
ta_update
;
uint8_t
current_harq_pid
;
NR_UE_harq_t
harq_processes
[
NR_MAX_NB_HARQ_PROCESSES
];
NR_UE_ul_harq_t
ul_harq_processes
[
NR_MAX_NB_HARQ_PROCESSES
];
int
dummy
;
NR_UE_mac_ce_ctrl_t
UE_mac_ce_ctrl
;
// MAC CE related information
}
NR_UE_sched_ctrl_t
;
...
...
This diff is collapsed.
Click to expand it.
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
61a2842d
...
...
@@ -41,6 +41,7 @@
#include "executables/softmodem-common.h"
#define MAX_IF_MODULES 100
#define UL_HARQ_PRINT
NR_IF_Module_t
*
if_inst
[
MAX_IF_MODULES
];
NR_Sched_Rsp_t
Sched_INFO
[
MAX_IF_MODULES
][
MAX_NUM_CCs
];
...
...
@@ -88,7 +89,7 @@ void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl) {
case
NFAPI_NR_UCI_PDCCH_PDU_TYPE
:
break
;
case
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
:
{
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
//
if (get_softmodem_params()->phy_test == 0) {
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
=
&
uci_list
[
i
].
pucch_pdu_format_0_1
;
// handle harq
int
harq_idx_s
=
0
;
...
...
@@ -120,7 +121,7 @@ void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl) {
}
}
}
}
//
}
break
;
}
...
...
@@ -131,8 +132,43 @@ void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl) {
UL_info
->
uci_ind
.
num_ucis
=
0
;
}
void
handle_nr_ul_harq
(
uint16_t
slot
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
uint8_t
crc_status
)
{
void
handle_nr_ulsch
(
NR_UL_IND_t
*
UL_info
)
{
int
max_harq_rounds
=
4
;
// TODO define macro
for
(
uint8_t
hrq_id
=
0
;
hrq_id
<
NR_MAX_NB_HARQ_PROCESSES
;
hrq_id
++
)
{
NR_UE_ul_harq_t
*
cur_harq
=
&
sched_ctrl
->
ul_harq_processes
[
hrq_id
];
if
((
cur_harq
->
last_tx_slot
==
slot
-
1
)
&&
cur_harq
->
state
==
ACTIVE_SCHED
)
{
if
(
!
crc_status
)
{
cur_harq
->
ndi
^=
1
;
cur_harq
->
round
=
0
;
cur_harq
->
state
=
INACTIVE
;
// passed -> make inactive. can be used by scheduder for next grant
#ifdef UL_HARQ_PRINT
printf
(
"[HARQ HANDLER] Ulharq id %d crc passed, freeing it for scheduler
\n
"
,
hrq_id
);
#endif
}
else
{
cur_harq
->
round
++
;
cur_harq
->
state
=
ACTIVE_NOT_SCHED
;
#ifdef UL_HARQ_PRINT
printf
(
"[HARQ HANDLER] Ulharq id %d crc failed, requesting retransmission
\n
"
,
hrq_id
);
#endif
}
if
(
!
(
cur_harq
->
round
<
max_harq_rounds
))
{
cur_harq
->
ndi
^=
1
;
cur_harq
->
state
=
INACTIVE
;
// failed after 4 rounds -> make inactive
cur_harq
->
round
=
0
;
#ifdef UL_HARQ_PRINT
printf
(
"[HARQ HANDLER] Ulharq id %d crc failed in all round, freeing it for scheduler
\n
"
,
hrq_id
);
#endif
}
return
;
}
}
}
void
handle_nr_ulsch
(
NR_UL_IND_t
*
UL_info
,
NR_UE_sched_ctrl_t
*
sched_ctrl
)
{
if
(
nfapi_mode
==
1
)
{
if
(
UL_info
->
crc_ind
.
number_crcs
>
0
)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
...
...
@@ -159,6 +195,8 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info) {
UL_info
->
rx_ind
.
pdu_list
[
i
].
rnti
)
{
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_list
[
j
].
tb_crc_status
);
handle_nr_ul_harq
(
UL_info
->
slot
,
sched_ctrl
,
UL_info
->
crc_ind
.
crc_list
[
j
].
tb_crc_status
);
if
(
UL_info
->
crc_ind
.
crc_list
[
j
].
tb_crc_status
==
1
)
{
// CRC error indication
LOG_D
(
MAC
,
"Frame %d, Slot %d Calling rx_sdu (CRC error)
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
);
...
...
@@ -233,7 +271,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
handle_nr_uci
(
UL_info
,
&
mac
->
UE_list
.
UE_sched_ctrl
[
0
]);
// clear HI prior to handling ULSCH
mac
->
UL_dci_req
[
CC_id
].
numPdus
=
0
;
handle_nr_ulsch
(
UL_info
);
handle_nr_ulsch
(
UL_info
,
&
mac
->
UE_list
.
UE_sched_ctrl
[
0
]
);
if
(
nfapi_mode
!=
1
)
{
if
(
ifi
->
CC_mask
==
((
1
<<
MAX_NUM_CCs
)
-
1
))
{
...
...
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