LOG_E(PHY,"Fatal error in HARQ entity due to unknown process identity %d at line %d in function %s of file %s \n",harq_pid,__LINE__,__func__,__FILE__);
...
...
@@ -258,7 +294,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, n
}
/* 38.321 5.4.2.1 2> if the uplink grant was received on PDCCH for the C-RNTI and the HARQ buffer of the identified process is empty */
if((ulsch->harq_processes[harq_pid]->first_tx==1)&&(rnti_type==C_RNTI_NR)){/* no transmission yet on this process so consider its harq buffer as empty */
if((ulsch->harq_processes[harq_pid]->first_tx==1)&&(rnti_type==_C_RNTI_)){/* no transmission yet on this process so consider its harq buffer as empty */
ulsch->harq_processes[harq_pid]->first_tx=0;
ulsch->harq_processes[harq_pid]->DCINdi=ndi;/* store first value of ndi */
ulsch->harq_processes[harq_pid]->round=0;
...
...
@@ -270,7 +306,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, n
}
/* 38.321 5.4.2.1 2> if the received grant was not addressed to a Temporary C-RNTI on PDCCH, and the NDI provided in the associated HARQ */
/* information has been toggled compared to the value in the previous transmission of this TB of this HARQ process */
elseif((ulsch->harq_processes[harq_pid]->DCINdi!=ndi)&&(rnti_type!=Temporary_C_RNTI_NR)){/* is ndi toogled so this is a new grant ? */
elseif((ulsch->harq_processes[harq_pid]->DCINdi!=ndi)&&(rnti_type!=_TC_RNTI_)){/* is ndi toogled so this is a new grant ? */
ulsch->harq_processes[harq_pid]->DCINdi=ndi;/* store first value of ndi */
This directory contains testbenchs for 5G NR physical layers.
...
...
@@ -33,37 +32,30 @@ Install tools:
Build NR UE:
- under openairinterface5g/cmake_targets/build --nrUE
Files
=====
Specific test files
====================
pss_test.c: test for detection of primary synchronisation signal.
sss_test.c: test for detection of secundary synchronisation signal.
pbch_test.c: test for decoding of packet braodcast channel.
srs_test.c: test of sounding reference signal.
frame_config_test.c : test of frame configurations (FDD/TDD).
harq_test.c : test of HARQ downlink and uplink.
pucch_uci_test : test of packed Uplink Control Channel Uplink Control Information
pss_util_test.c: common functions for running synchronisation tests.
pss_util_test.h: common headers for synchronisation tests.
input_buffer_test.h: it allows providing samples for pss test.
How to build & run tests
========================
Before building, oai environment should be set by entering under openairinterface5g "source oaienv".
Before building, oai environment should be set by entering under directory openairinterface5g "source oaienv".
A script allows to build, to run and to check all tests:
A script "run_tests.sh" allows to build, to run and to check all tests.
To run a complete non regression of unit tests, go under directory NR_UE_PHY/unit_tests/build and execute:
./run_tests.sh
>run_tests
This script "run_tests.sh" list all available unit tests.
build is based on cmake tool.
...
...
@@ -73,7 +65,10 @@ CMakeList.txt lists different build.
How to build: in directory "oai_openairinterface/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/", below commands should be entered:
First command to do:
cmake CMakeList.txt -> it generates makefiles to build all projects.
Then build of test:
make pss_test -> build pss_test: detection of NR (Primary Synchronisation Channel - synchronisation of UE).
make sss_test -> build sss_test: detection of NR SSS (Secundary Synchronisation Channel - second step for UE synchronisation).
make pbch_test -> build pbch_test: decoding of NR PBCH (Packet Broadcast Channel -> UE read MIB Master Information Block which gives network parameters).
make pucch_uci_test -> build pucch_uci_test : Packet Uplink Control Channel / Uplink Control information : create UCI payload and select PUCCH formats and its parameters.
make clean -> clean all projects.
And execution of tests:
./pss_test -> run NR PSS tests.
./sss_test -> run NR SSS tests.
./pbch_test -> run NR PBCH tests.
...
...
@@ -94,8 +90,28 @@ make clean -> clean all projects.
There is a script in build/run_test.sh which allows:
- building/running/checking all tests
Checking consists in a comparaison of generated logging file at execution with a reference logging file which is stored under git for each test.
What is test result?
====================
Test verdict consists in a comparaison of generated logging file at execution with a reference logging file which is stored under git for each test.
By default, tool "meld" is open each time there is a difference between reference file and logging file.
It is possible to disable execution of meld with option -m.
Build/execute only one test:
===========================
The script "run_tests.sh" has different options:
"-b : No Build of unit tests"
"-c : No check for unit test"
"-e : No execution of unit tests"
"-m : No run of meld tool"
./run_tests.sh -> run all unit tests (build, execute and compare for each test)
./run_tests.sh -m -> run all unit tests but meld is not used (verdict is based on system command "cmp").
./run_tests.sh -b -c -r -m -> list all available unit tests
./run_tests.sh pss_test -> run only one test (here it is pss_test).
./run_tests.sh -c -e -m pss_test -> build only one test
./run_tests.sh -m pss_test -> run only one test but without execution of meld
Which processing can be tuned?
=============================
...
...
@@ -121,7 +137,6 @@ Status
======
NR synchronisation tests run successfully with default parameters.
Warning: Tests of PSS NR with decimation (based on FIR or CIC filter) does not run successfully at the moment.