Merge branch 'integration_2023_w33' into 'develop'

integration_2023_w33

See merge request oai/openairinterface5g!2300

* !2247 Fix cppcheck warnings related to nullPointerArithmeticRedundantCheck
* !2250 Fix cppcheck warnings related to negativeIndex
* !2281 avoid NR UE stalling if SIB not decoded
* !2273 NR_UE: fix limited UL data throughput in do-ra mode
* !2295 hack: see Bye. message when quitting gnb running with aw2s
* !2298 mapping LCID to RBID to index RLC entities
* !2267 Make read-only global variables const, additional fixes
* !2297 nr rlc: change retx logic
* !2230 Readme correction
* Lower scheduler PF averaging constant
This commit is contained in:
Robert Schmidt
2023-08-22 06:05:25 +00:00
82 changed files with 1881 additions and 1625 deletions
@@ -22,7 +22,7 @@ gNBs =
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
pusch_AntennaPorts = 1;
do_CSIRS = 1;
do_SRS = 0;
@@ -220,7 +220,7 @@ RUs = (
tr_preference = "udp_ecpri_if5"
nb_tx = 2
nb_rx = 2
att_tx = 16
att_tx = 18
att_rx = 0;
num_tp_cores = 4;
rxfh_core_id = 9;
@@ -410,16 +410,33 @@ in HSS config:
NB_USERS: 10
```
in UE config:
All UE parameter values will be taken from the mounted config file, so modify
the corresponding UE file to reflect the above changes
```yaml
MCC: '208'
MNC: '96'
SHORT_IMSI: '0100000001'
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'c42449363bbad02b66d16bc975d77cc1'
MSISDN: '001011234561010'
HPLMN: 20896
oai_ue0:
[...]
volumes:
- ../../conf_files/lteue.usim-ci.conf:/opt/oai-lte-ue/etc/ue_usim.conf
```
and in the UE file, you should have
```
PLMN: {
PLMN0: {
FULLNAME="OpenAirInterface";
SHORTNAME="OAICN";
MNC="96";
MCC="208";
};
};
[...]
SIM: {
MSIN="0100000001";
USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f";
OPC="c42449363bbad02b66d16bc975d77cc1";
MSISDN="001011234561010";
};
```
As you can see: `LTE_K` and `LTE_KEY` are the same value. And `OP_KEY` and `OPC` can be deduced from each other. Look in HSS logs.
@@ -471,13 +488,19 @@ in SPGW-C/-U configs:
REALM: openairinterface.org
```
in eNB config:
In eNB, all the parameter values will be taken from the mounted config file.
```yaml
MCC: '208'
MNC: '96'
MNC_LENGTH: 2
TAC: 1
oai_enb0:
[...]
volumes:
- ../../conf_files/enb.band7.25prb.rfsim.conf:/opt/oai-enb/etc/enb.conf
```
with the eNB config reading:
```libconfig
plmn_list = ( { mcc = 208; mnc = 96; mnc_length = 2; } );
```
The values SHALL match, and `TAC` shall match `TAC_0` from MME.
+40 -7
View File
@@ -321,19 +321,52 @@ In the `SMF` section, provide your own DNS IP address:
DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
```
In the `gNB` section, provide your docker-host primary IP address and interface name: in our case `172.21.16.128` and `eno1`.
gNB section:
All the parameter values will be taken from the mounted config file
```yaml
GNB_NGA_IF_NAME: eno1
GNB_NGA_IP_ADDRESS: 172.21.16.128
GNB_NGU_IF_NAME: eno1
GNB_NGU_IP_ADDRESS: 172.21.16.128
oai-gnb:
[...]
volumes:
- ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf
```
Same thing in the `nr-ue` section:
with the configuration file having something like:
```libconfig
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.128";
GNB_INTERFACE_NAME_FOR_NGU = "eno1";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.128";
GNB_PORT_FOR_NGU = 2152; # Spec 2152
};
```
For the UE, all the parameter values will be taken from the mounted config
file. Example:
```yaml
NR_UE_NFAPI_IF_NAME: eno1
oai-nr-ue0:
[...]
volumes:
- ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf
- ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
```
where the UE configuration (mounted to `/opt/oai-nr-ue/etc/nr-ue.conf`) reads
```libconfig
MACRLCs = (
{
num_cc = 1;
tr_n_preference = "nfapi";
local_n_if_name = "eno1";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";
...
```
This tutorial is a first draft. This nFAPI feature and the proxy are still under development.
+32 -15
View File
@@ -234,24 +234,23 @@ oaitun_ue1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
## 2.4. Deploy Second OAI NR-UE in RF simulator mode and in Standalone Mode ##
```bash
Create a entry for new IMSI (208990100001101) in oai_db.sql file
Refer Section - [Making the NR-UE connect to the core network](#51-making-the-nr-ue-connect-to-the-core-network)
Create a entry for new IMSI (208990100001101) in oai_db.sql file.
For this, refer to section [Making the NR-UE connect to the core
network](#51-making-the-nr-ue-connect-to-the-core-network)
Create entry for Second UE in docker-compose.yaml file as follows:
Create the entry for the second UE in `docker-compose.yaml` file as follows:
```yaml
oai-nr-ue2:
image: oai-nr-ue:develop
privileged: true
container_name: rfsim5g-oai-nr-ue2
environment:
FULL_IMSI: '208990100001101'
FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'C42449363BBAD02B66D16BC975D77CC1'
DNN: oai
NSSAI_SST: 1
USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
networks:
public_net:
ipv4_address: 192.168.71.151
@@ -496,13 +495,31 @@ INSERT INTO `users` VALUES ('208990100001101','1','55000000000000',NULL,'PURGED'
As you can see, 2 other values shall match in the NR-UE section of `docker-compose.yaml`:
OAI UE - 1
* `FULL_IMSI: '208990100001100'`
* `FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'`
All the values such as IMSI and KEY are taken from the configuration file mounted into the container. For the first UE, provision as usual through the config file
OAI UE - 2
* `FULL_IMSI: '208990100001101'`
* `FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'`
```yaml
oai-nr-ue:
[...]
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
```
with the config having:
```libconfig
uicc0 = {
imsi = "208990100001100";
key = "fec86ba6eb707ed08905757b1bb44b8f";
opc= "C42449363BBAD02B66D16BC975D77CC1";
dnn= "oai";
nssai_sst=1;
}
```
The second UE's IMSI might be changed by either having the second UEs
docker-compose entry mount another config, or add `--uicc0.imsi
208990100001101` in `USE_ADDITIONAL_OPTIONS` entry. Note that the latter is a
feature of the configuration module to overwrite any configuration option in
the config file on the command line.
We are also using a dedicated `oai-smf.conf` for the `SMF` container: the `oai` DNN shall match the one in the NR-UE section of `docker-compose.yaml` (`DNN: oai`).
+2 -2
View File
@@ -1,7 +1,7 @@
The configuration module objectives are
1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
1. Use a common configuration API in all oai modules
1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.
2. Use a common configuration API in all oai modules
3. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.
As a developer you may need to look at these sections:
@@ -1,7 +1,7 @@
The configuration module maps a configuration file section to a `paramdef_t` structure array. One `config_get` call can be used to return the values of all the parameters described in the `paramdef_t` array.
Retrieving a single occurence of a parameter set ( a group in the libconfig terminology) is just a two steps task:
1. describe the parameters in a `paramdef_t` array
1. call the `config_get` function
2. call the `config_get` function
[config_get example](../../config/devusage/addaparam.md)
+22 -7
View File
@@ -1,9 +1,16 @@
[[_TOC_]]
-O is the only mandatory command line option to start the eNodeb softmodem (lte-softmodem executable), it is used to specify the configuration source with the associated parameters:
# General usage
`-O` is the only mandatory command line option to start the softmodems (4G/5G xNB, UEs). It is used to specify the configuration source with the associated parameters:
```bash
$ ./lte-softmodem -O <configsource>:<parameter1>:<parameter2>:...
```
The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is used in the ue-softmodem executable and by the phy_simulators executables (ulsim, dlsim)
The same applies for `nr-softmodem`, `lte-uesoftmodem`, `nr-uesoftmodem`.
The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is typically used in the `lte-uesoftmodem` executable and by the physical simulator executables (`ulsim`, `dlsim`).
# Configuration sources
Currently the available config sources are:
@@ -13,6 +20,8 @@ $ ./lte-softmodem -O libconfig:<config>:dbgl<debuglevel>
```
- **cmdlineonly**: command line only, the default mode for lte-uesoftmodem and the phy simiulators. In this case -O may be used to specify the config module debug level.
# Detailed configuration information and debugging
The debug level is a mask:
* bit 1: print parameters values
* bit 2: print memory allocation/free performed by the config module
@@ -32,8 +41,8 @@ bit 5 (dbgl32) can be useful to detect unused parameters from a config file or t
To get help on supported parameters you can use specific options:
* ---help: print help for command line only parameters and for parameters not defined in a specific section
* ---help_< prefix > : print help for parameters defined under the section < prefix >
* `--help`: print help for command line only parameters and for parameters not defined in a specific section
* `--help_<prefix>` : print help for parameters defined under the section `<prefix>`
```
./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf --help
@@ -84,15 +93,16 @@ Getting ENBSParams
--------------------------------------------------------------------
/usr/local/oai/issue390_configmodule_cmdlinebug/openairinterface5g/common/config/config_cmdline.c:224 config_process_cmdline() Exiting OAI softmodem: [CONFIG] Exiting after displaying help
```
For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.
For the lte-softmodem (the eNodeB), the config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.
```bash
$ ./lte-softmodem -O <config>
```
# Configuration of the configuration module
Configuration file parameters, except for the configuration file path, can be specified in a **config** section in the configuration file:
```
@@ -101,7 +111,12 @@ config:
debugflags = 1;
}
```
Configuration files examples can be found in the targets/PROJECTS/GENERIC-LTE-EPC/CONF sub-directory of the oai source tree. To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter:
Configuration files examples can be found in the `targets/PROJECTS/GENERIC-LTE-EPC/CONF` sub-directory of the oai source tree.
# Overwriting config options from the command line
To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter:
```bash
$ ./lte-softmodem -O <config> --eNBs.[0].component_carriers.[0].N_RB_DL 100
+18 -41
View File
@@ -55,8 +55,7 @@ void read_cpu_hardware (void) __attribute__ ((constructor));
void read_cpu_hardware (void) {__builtin_cpu_init(); }
log_mem_cnt_t log_mem_d[2];
int log_mem_flag=0;
int log_mem_multi=1;
int log_mem_flag = 0;
volatile int log_mem_side=0;
pthread_mutex_t log_mem_lock;
pthread_cond_t log_mem_notify;
@@ -88,9 +87,9 @@ const mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
mapping log_maskmap[] = LOG_MASKMAP_INIT;
static const char *log_level_highlight_start[] =
static const char *const log_level_highlight_start[] =
{LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
static const char *log_level_highlight_end[] =
static const char *const log_level_highlight_end[] =
{LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
@@ -941,35 +940,24 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
int logInit_log_mem (void)
{
if(log_mem_flag==1){
if(log_mem_multi==1){
printf("log-mem multi!!!\n");
log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE);
log_mem_d[0].buf_index=0;
log_mem_d[0].enable_flag=1;
log_mem_d[1].buf_p = malloc(LOG_MEM_SIZE);
log_mem_d[1].buf_index=0;
log_mem_d[1].enable_flag=1;
log_mem_side=0;
if ((pthread_mutex_init (&log_mem_lock, NULL) != 0)
|| (pthread_cond_init (&log_mem_notify, NULL) != 0)) {
if (log_mem_flag == 1) {
log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE);
log_mem_d[0].buf_index = 0;
log_mem_d[0].enable_flag = 1;
log_mem_d[1].buf_p = malloc(LOG_MEM_SIZE);
log_mem_d[1].buf_index = 0;
log_mem_d[1].enable_flag = 1;
log_mem_side = 0;
if ((pthread_mutex_init(&log_mem_lock, NULL) != 0) || (pthread_cond_init(&log_mem_notify, NULL) != 0)) {
log_mem_d[1].enable_flag=0;
return -1;
}
pthread_create(&log_mem_thread, NULL, (void *(*)(void *))flush_mem_to_file, (void*)NULL);
}else{
printf("log-mem single!!!\n");
log_mem_d[0].buf_p = malloc(LOG_MEM_SIZE);
log_mem_d[0].buf_index=0;
log_mem_d[0].enable_flag=1;
log_mem_d[1].enable_flag=0;
log_mem_side=0;
}
}else{
log_mem_d[0].buf_p=NULL;
log_mem_d[1].buf_p=NULL;
log_mem_d[0].enable_flag=0;
log_mem_d[1].enable_flag=0;
pthread_create(&log_mem_thread, NULL, (void *(*)(void *))flush_mem_to_file, (void *)NULL);
} else {
log_mem_d[0].buf_p = NULL;
log_mem_d[1].buf_p = NULL;
log_mem_d[0].enable_flag = 0;
log_mem_d[1].enable_flag = 0;
}
printf("log init done\n");
@@ -989,7 +977,6 @@ void close_log_mem(void){
while(log_mem_write_flag==1){
usleep(100);
}
if(log_mem_multi==1){
snprintf(f_name,1024, "%s_%d.log",log_mem_filename,log_mem_file_cnt);
fp=open(f_name, O_WRONLY | O_CREAT, 0666);
int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index);
@@ -1009,16 +996,6 @@ void close_log_mem(void){
}
close(fp);
free(log_mem_d[1].buf_p);
}else{
fp=open(log_mem_filename, O_WRONLY | O_CREAT, 0666);
int ret = write(fp, log_mem_d[0].buf_p, log_mem_d[0].buf_index);
if ( ret < 0) {
fprintf(stderr,"{LOG} %s %d Couldn't write in %s \n",__FILE__,__LINE__,log_mem_filename);
exit(EXIT_FAILURE);
}
close(fp);
free(log_mem_d[0].buf_p);
}
}
}
+385 -184
View File
@@ -36,215 +36,416 @@
#include "PHY/LTE_TRANSPORT/transport_common.h"
// This is table 5.7.1-4 from 36.211
PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = {
// TDD Configuration Index 0
{ {1,{{0,1,0,2}}},{1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {1,{{0,1,0,2}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {1,{{0,1,0,2}}}},
// TDD Configuration Index 1
{ {1,{{0,2,0,2}}},{1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {1,{{0,2,0,2}}}, {1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {1,{{0,2,0,2}}}},
// TDD Configuration Index 2
{ {1,{{0,1,1,2}}},{1,{{0,1,1,1}}}, {1,{{0,1,1,0}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,1,1}}}},
// TDD Configuration Index 3
{ {1,{{0,0,0,2}}},{1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {1,{{0,0,0,2}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {1,{{0,0,0,2}}}},
// TDD Configuration Index 4
{ {1,{{0,0,1,2}}},{1,{{0,0,1,1}}}, {1,{{0,0,1,0}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,1,1}}}},
// TDD Configuration Index 5
{ {1,{{0,0,0,1}}},{1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}},
// TDD Configuration Index 6
{ {2,{{0,0,0,2},{0,0,1,2}}}, {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {2,{{0,0,0,1},{0,0,0,2}}}, {2,{{0,0,0,0},{0,0,0,1}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {2,{{0,0,0,2},{0,0,1,1}}}},
// TDD Configuration Index 7
{ {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{0,0,0,2}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{0,0,1,0}}}},
// TDD Configuration Index 8
{ {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{0,0,0,1}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{0,0,1,1}}}},
// TDD Configuration Index 9
{ {3,{{0,0,0,1},{0,0,0,2},{0,0,1,2}}}, {3,{{0,0,0,0},{0,0,0,1},{0,0,1,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,1},{0,0,0,2}}}, {3,{{0,0,0,0},{0,0,0,1},{1,0,0,1}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {3,{{0,0,0,1},{0,0,0,2},{0,0,1,1}}}},
// TDD Configuration Index 10
{ {3,{{0,0,0,0},{0,0,1,0},{0,0,1,1}}}, {3,{{0,0,0,1},{0,0,1,0},{0,0,1,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,1},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,2},{0,0,1,0}}}},
// TDD Configuration Index 11
{ {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,1},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{0,0,1,0},{0,0,1,1}}}},
// TDD Configuration Index 12
{ {4,{{0,0,0,1},{0,0,0,2},{0,0,1,1},{0,0,1,2}}}, {4,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1}}},
{4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}},
{4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,2}}},
{4,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1}}},
{4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}},
{4,{{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1}}}
},
// TDD Configuration Index 13
{ {4,{{0,0,0,0},{0,0,0,2},{0,0,1,0},{0,0,1,2}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,1}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,1}}}
},
// TDD Configuration Index 14
{ {4,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,0},{0,0,0,2},{0,0,1,0},{0,0,1,1}}}
},
// TDD Configuration Index 15
{ {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,1},{0,0,1,2}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,1}}},
{5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,1},{1,0,0,2}}},
{5,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1},{2,0,0,1}}}, {5,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0}}},
{5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1}}}
},
// TDD Configuration Index 16
{ {5,{{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{0,0,1,2}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,1,1}}},
{5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,1,0}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0},{1,0,0,2}}},
{5,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}
},
// TDD Configuration Index 17
{ {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,2}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0},{1,0,0,1}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}
},
// TDD Configuration Index 18
{ {6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{0,0,1,2}}},
{6,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,1},{1,0,1,1}}},
{6,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0},{2,0,1,0}}},
{6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0},{1,0,0,1},{1,0,0,2}}},
{6,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1},{2,0,0,0},{2,0,0,1}}},
{6,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0},{5,0,0,0}}},
{6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{1,0,0,2}}}
},
// TDD Configuration Index 19
{ {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{6,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,0},{1,0,1,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{1,0,1,1}}}
},
// TDD Configuration Index 20
{ {1,{{0,1,0,1}}},{1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}},
// TDD Configuration Index 21
{ {1,{{0,2,0,1}}},{1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}},
const PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = {
// TDD Configuration Index 0
{{1, {{0, 1, 0, 2}}},
{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{1, {{0, 1, 0, 2}}},
{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{1, {{0, 1, 0, 2}}}},
// TDD Configuration Index 1
{{1, {{0, 2, 0, 2}}},
{1, {{0, 2, 0, 1}}},
{1, {{0, 2, 0, 0}}},
{1, {{0, 2, 0, 2}}},
{1, {{0, 2, 0, 1}}},
{1, {{0, 2, 0, 0}}},
{1, {{0, 2, 0, 2}}}},
// TDD Configuration Index 2
{{1, {{0, 1, 1, 2}}},
{1, {{0, 1, 1, 1}}},
{1, {{0, 1, 1, 0}}},
{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 1, 1}}}},
// TDD Configuration Index 3
{{1, {{0, 0, 0, 2}}},
{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 2}}},
{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 2}}}},
// TDD Configuration Index 4
{{1, {{0, 0, 1, 2}}},
{1, {{0, 0, 1, 1}}},
{1, {{0, 0, 1, 0}}},
{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 1, 1}}}},
// TDD Configuration Index 5
{{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 1}}}},
// TDD Configuration Index 6
{{2, {{0, 0, 0, 2}, {0, 0, 1, 2}}},
{2, {{0, 0, 0, 1}, {0, 0, 1, 1}}},
{2, {{0, 0, 0, 0}, {0, 0, 1, 0}}},
{2, {{0, 0, 0, 1}, {0, 0, 0, 2}}},
{2, {{0, 0, 0, 0}, {0, 0, 0, 1}}},
{2, {{0, 0, 0, 0}, {1, 0, 0, 0}}},
{2, {{0, 0, 0, 2}, {0, 0, 1, 1}}}},
// TDD Configuration Index 7
{{2, {{0, 0, 0, 1}, {0, 0, 1, 1}}},
{2, {{0, 0, 0, 0}, {0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 0}, {0, 0, 0, 2}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 1}, {0, 0, 1, 0}}}},
// TDD Configuration Index 8
{{2, {{0, 0, 0, 0}, {0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 0}, {0, 0, 0, 1}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 0}, {0, 0, 1, 1}}}},
// TDD Configuration Index 9
{{3, {{0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 2}}},
{3, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 1}}},
{3, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}}},
{3, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}}},
{3, {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 0, 0, 1}}},
{3, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}}},
{3, {{0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 1}}}},
// TDD Configuration Index 10
{{3, {{0, 0, 0, 0}, {0, 0, 1, 0}, {0, 0, 1, 1}}},
{3, {{0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}}},
{3, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 0}, {0, 0, 0, 2}, {0, 0, 1, 0}}}},
// TDD Configuration Index 11
{{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}}}},
// TDD Configuration Index 12
{{4, {{0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 1}, {0, 0, 1, 2}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}}},
{4, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 2}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}}},
{4, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}}},
{4, {{0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}}}},
// TDD Configuration Index 13
{{4, {{0, 0, 0, 0}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 2}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 1}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 1}}}},
// TDD Configuration Index 14
{{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 0}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}}}},
// TDD Configuration Index 15
{{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 1}, {0, 0, 1, 2}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 0, 1}}},
{5, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 0, 0}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 1}, {1, 0, 0, 2}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {2, 0, 0, 1}}},
{5, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}, {4, 0, 0, 0}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}}}},
// TDD Configuration Index 16
{{5, {{0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 0, 1, 2}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 1, 1}}},
{5, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 1, 0}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 0}, {1, 0, 0, 2}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {2, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}},
// TDD Configuration Index 17
{{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 2}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{5, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 0}, {1, 0, 0, 1}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}},
// TDD Configuration Index 18
{{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 0, 1, 2}}},
{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}}},
{6, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 0, 0}, {2, 0, 1, 0}}},
{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 0, 2}}},
{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {2, 0, 0, 0}, {2, 0, 0, 1}}},
{6, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}, {4, 0, 0, 0}, {5, 0, 0, 0}}},
{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 0, 2}}}},
// TDD Configuration Index 19
{{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 0, 0}, {1, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{6, {{0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 2}, {0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 1, 1}}}},
// TDD Configuration Index 20
{{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 0, 1}}}},
// TDD Configuration Index 21
{{1, {{0, 2, 0, 1}}},
{1, {{0, 2, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 2, 0, 1}}},
{1, {{0, 2, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 2, 0, 1}}}},
// TDD Configuration Index 22
{ {1,{{0,1,1,1}}},{1,{{0,1,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,1,0}}}},
// TDD Configuration Index 22
{{1, {{0, 1, 1, 1}}},
{1, {{0, 1, 1, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 1, 0}}}},
// TDD Configuration Index 23
{ {1,{{0,0,0,1}}},{1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}},
// TDD Configuration Index 23
{{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 1}}}},
// TDD Configuration Index 24
{ {1,{{0,0,1,1}}},{1,{{0,0,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,1,0}}}},
// TDD Configuration Index 24
{{1, {{0, 0, 1, 1}}},
{1, {{0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 1, 0}}}},
// TDD Configuration Index 25
{ {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{1,0,0,1}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{0,0,1,0}}}},
// TDD Configuration Index 25
{{2, {{0, 0, 0, 1}, {0, 0, 1, 1}}},
{2, {{0, 0, 0, 0}, {0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 1}, {1, 0, 0, 1}}},
{2, {{0, 0, 0, 0}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 1}, {0, 0, 1, 0}}}},
// TDD Configuration Index 26
{ {3,{{0,0,0,1},{0,0,1,1},{1,0,0,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{1,0,0,1},{2,0,0,1}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{0,0,1,0},{1,0,0,1}}}},
// TDD Configuration Index 26
{{3, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}}},
{3, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}}},
{3, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}}}},
// TDD Configuration Index 27
{ {4,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1}}}, {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1}}},
{4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0}}}
},
// TDD Configuration Index 27
{{4, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}}},
{4, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}, {3, 0, 0, 1}}},
{4, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}}}},
// TDD Configuration Index 28
{ {5,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1}}}, {5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {5,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1}}},
{5,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{5,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1}}}
},
// TDD Configuration Index 28
{{5, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}, {2, 0, 0, 1}}},
{5, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{5, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}, {3, 0, 0, 1}, {4, 0, 0, 1}}},
{5, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}, {4, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{5, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {2, 0, 0, 1}}}},
// TDD Configuration Index 29
{ {6,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1},{2,0,1,1}}},
{6,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0},{2,0,1,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{6,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1},{5,0,0,1}}},
{6,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0},{5,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{6,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1},{2,0,1,0}}}
},
// TDD Configuration Index 29
{{6, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}, {2, 0, 0, 1}, {2, 0, 1, 1}}},
{6, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 0, 0}, {2, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{6, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}, {3, 0, 0, 1}, {4, 0, 0, 1}, {5, 0, 0, 1}}},
{6, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}, {4, 0, 0, 0}, {5, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{6, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {2, 0, 0, 1}, {2, 0, 1, 0}}}},
// TDD Configuration Index 30
{{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 0, 1}}},
{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 0, 1}}}},
// TDD Configuration Index 30
{ {1,{{0,1,0,1}}},{1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}},
// TDD Configuration Index 31
{{1, {{0, 2, 0, 1}}},
{1, {{0, 2, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 2, 0, 1}}},
{1, {{0, 2, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 2, 0, 1}}}},
// TDD Configuration Index 31
{ {1,{{0,2,0,1}}},{1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}},
// TDD Configuration Index 32
{{1, {{0, 1, 1, 1}}},
{1, {{0, 1, 1, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 1, 0}}}},
// TDD Configuration Index 32
{ {1,{{0,1,1,1}}},{1,{{0,1,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,1,0}}}},
// TDD Configuration Index 33
{{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 1}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 1}}}},
// TDD Configuration Index 33
{ {1,{{0,0,0,1}}},{1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}},
// TDD Configuration Index 34
{{1, {{0, 0, 1, 1}}},
{1, {{0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 1, 0}}}},
// TDD Configuration Index 34
{ {1,{{0,0,1,1}}},{1,{{0,0,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,1,0}}}},
// TDD Configuration Index 35
{{2, {{0, 0, 0, 1}, {0, 0, 1, 1}}},
{2, {{0, 0, 0, 0}, {0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 1}, {1, 0, 0, 1}}},
{2, {{0, 0, 0, 0}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 1}, {0, 0, 1, 0}}}},
// TDD Configuration Index 35
{ {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{1,0,0,1}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{0,0,1,0}}}},
// TDD Configuration Index 36
{{3, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}}},
{3, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}}},
{3, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}}}},
// TDD Configuration Index 36
{ {3,{{0,0,0,1},{0,0,1,1},{1,0,0,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{1,0,0,1},{2,0,0,1}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{0,0,1,0},{1,0,0,1}}}},
// TDD Configuration Index 37
{{4, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}}},
{4, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}, {3, 0, 0, 1}}},
{4, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}}}},
// TDD Configuration Index 37
{ {4,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1}}}, {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1}}},
{4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0}}}
},
// TDD Configuration Index 38
{{5, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}, {2, 0, 0, 1}}},
{5, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{5, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}, {3, 0, 0, 1}, {4, 0, 0, 1}}},
{5, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}, {4, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{5, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {2, 0, 0, 1}}}},
// TDD Configuration Index 38
{ {5,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1}}}, {5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {5,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1}}},
{5,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{5,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1}}}
},
// TDD Configuration Index 39
{{6, {{0, 0, 0, 1}, {0, 0, 1, 1}, {1, 0, 0, 1}, {1, 0, 1, 1}, {2, 0, 0, 1}, {2, 0, 1, 1}}},
{6, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {2, 0, 0, 0}, {2, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{6, {{0, 0, 0, 1}, {1, 0, 0, 1}, {2, 0, 0, 1}, {3, 0, 0, 1}, {4, 0, 0, 1}, {5, 0, 0, 1}}},
{6, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}, {4, 0, 0, 0}, {5, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{6, {{0, 0, 0, 1}, {0, 0, 1, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {2, 0, 0, 1}, {2, 0, 1, 0}}}},
// TDD Configuration Index 39
{ {6,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1},{2,0,1,1}}},
{6,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0},{2,0,1,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{6,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1},{5,0,0,1}}},
{6,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0},{5,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{6,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1},{2,0,1,0}}}
},
// TDD Configuration Index 40
{{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 1, 0, 0}}}},
// TDD Configuration Index 41
{{1, {{0, 2, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 2, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 2, 0, 0}}}},
// TDD Configuration Index 40
{ {1,{{0,1,0,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,0}}}},
// TDD Configuration Index 41
{ {1,{{0,2,0,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,0}}}},
// TDD Configuration Index 42
{{1, {{0, 1, 1, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}}},
// TDD Configuration Index 42
{ {1,{{0,1,1,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}},
// TDD Configuration Index 43
{{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{1, {{0, 0, 0, 0}}}},
// TDD Configuration Index 43
{ {1,{{0,0,0,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,0}}}},
// TDD Configuration Index 44
{{1, {{0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}}}},
// TDD Configuration Index 44
{ {1,{{0,0,1,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}},
// TDD Configuration Index 45
{{2, {{0, 0, 0, 0}, {0, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 0}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}}},
{2, {{0, 0, 0, 0}, {1, 0, 0, 0}}}},
// TDD Configuration Index 45
{ {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{1,0,0,0}}}},
// TDD Configuration Index 46
{ {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}},
// TDD Configuration Index 47
{ {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}},
{4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}}
}
};
// TDD Configuration Index 46
{{3, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{3, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}}}},
// TDD Configuration Index 47
{{4, {{0, 0, 0, 0}, {0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{0, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}},
{4, {{0, 0, 0, 0}, {1, 0, 0, 0}, {2, 0, 0, 0}, {3, 0, 0, 0}}}}};
uint8_t get_prach_fmt(int prach_ConfigIndex,int frame_type) {
if (frame_type == FDD) // FDD
+6 -6
View File
@@ -36,12 +36,12 @@
const char *duplex_mode[]={"FDD","TDD"};
int tables_5_3_2[5][12] = {
{25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 245, 273},// 30 FR1
{-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1 , -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
static const int tables_5_3_2[5][12] = {
{25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
};
int get_supported_band_index(int scs, int band, int n_rbs)
+1
View File
@@ -81,6 +81,7 @@ Legacy unmaintained files:
- The [logging module](../common/utils/LOG/DOC/log.md)
- The [shared object loader](../common/utils/DOC/loader.md)
- The [threadpool](../common/utils/threadPool/thread-pool.md) used in L1
- The [LDPC implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md) is a shared library
## SDRs
-1
View File
@@ -133,7 +133,6 @@ double sample_rate=30.72e6;
double bw = 10.0e6;
uint8_t dci_Format = 0;
uint8_t agregation_Level =0xFF;
uint8_t nb_antenna_tx = 1;
uint8_t nb_antenna_rx = 1;
-2
View File
@@ -132,9 +132,7 @@ double bw = 10.0e6;
static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/;
uint8_t dci_Format = 0;
uint8_t agregation_Level =0xFF;
uint8_t nb_antenna_tx = 1;
uint8_t nb_antenna_rx = 1;
+6 -5
View File
@@ -338,7 +338,9 @@ void fh_if5_south_in(RU_t *ru,
if (proc->frame_rx != *frame) {
LOG_E(PHY,"Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d proc->tti_rx %d tti %d)\n",proc->frame_rx,*frame,proc->tti_rx,*tti);
exit_fun("Exiting");
if (!oai_exit)
exit_fun("Exiting");
return;
}
} else {
proc->first_rx = 0;
@@ -1504,11 +1506,10 @@ int check_capabilities(RU_t *ru,RRU_capabilities_t *cap) {
return(-1);
}
const char rru_format_options[4][20] = {"OAI_IF5_only", "OAI_IF4p5_only", "OAI_IF5_and_IF4p5", "MBP_IF5"};
char rru_format_options[4][20] = {"OAI_IF5_only","OAI_IF4p5_only","OAI_IF5_and_IF4p5","MBP_IF5"};
char rru_formats[3][20] = {"OAI_IF5","MBP_IF5","OAI_IF4p5"};
char ru_if_formats[4][20] = {"LOCAL_RF","REMOTE_OAI_IF5","REMOTE_MBP_IF5","REMOTE_OAI_IF4p5"};
const char rru_formats[3][20] = {"OAI_IF5", "MBP_IF5", "OAI_IF4p5"};
const char ru_if_formats[4][20] = {"LOCAL_RF", "REMOTE_OAI_IF5", "REMOTE_MBP_IF5", "REMOTE_OAI_IF4p5"};
void configure_ru(int idx,
void *arg) {
-6
View File
@@ -138,16 +138,10 @@ static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/;
int chain_offset=0;
uint8_t dci_Format = 0;
uint8_t agregation_Level =0xFF;
uint8_t nb_antenna_tx = 1;
uint8_t nb_antenna_rx = 1;
char ref[128] = "internal";
char channels[128] = "0";
int rx_input_level_dBm;
int otg_enabled;
-1
View File
@@ -154,7 +154,6 @@ double cpuf;
int chain_offset = 0;
int card_offset = 0;
uint64_t num_missed_slots = 0; // counter for the number of missed slots
int transmission_mode = 1;
int numerology = 0;
int oaisim_flag = 0;
int emulate_rf = 0;
+1 -1
View File
@@ -109,7 +109,7 @@ void get_common_options(uint32_t execmask) {
config_set_checkfunctions(cmdline_params, cmdline_CheckParams, numparams);
config_get(cmdline_params, sizeof(cmdline_params) / sizeof(paramdef_t), NULL);
nfapi_index = config_paramidx_fromname(cmdline_params, sizeof(cmdline_params) / sizeof(paramdef_t),"nfapi");
AssertFatal(nfapi_index != -1,"Index for nfapi config option not found!");
AssertFatal(nfapi_index >= 0,"Index for nfapi config option not found!");
nfapi_mode = config_get_processedint(&cmdline_params[nfapi_index]);
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
-1
View File
@@ -83,7 +83,6 @@ nfapi_nr_pdu_t *tx_data_request[1023][20][10]; //[frame][slot][max_num_pdus]
uint8_t tx_pdus[32][8][4096];
nfapi_ue_release_request_body_t release_rntis;
uint16_t phy_antenna_capability_values[] = { 1, 2, 4, 8, 16 };
nfapi_nr_pnf_param_response_t g_pnf_param_resp;
+15 -7
View File
@@ -1485,17 +1485,23 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen
int nfapi_p4_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pPackedBuf, uint32_t packedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pMessageBuf;
uint8_t *end = pPackedBuf + packedBufLen;
uint8_t *pWritePackedMessage = pPackedBuf;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
uint32_t packedMsgLen;
uint16_t packedMsgLen16;
if (pMessageBuf == NULL || pPackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P4 Pack supplied pointers are null\n");
if (pMessageBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P4 Pack supplied message buffer pointer is null\n");
return -1;
}
if (packedBufLen == 0 || pPackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P4 Pack supplied packed buffer pointer is null or packed buffer length is 0\n");
return -1;
}
uint8_t *end = pPackedBuf + packedBufLen;
uint8_t *pWritePackedMessage = pPackedBuf;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
// process the header
if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, end) &&
@@ -1622,13 +1628,14 @@ int nfapi_p4_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pPack
int nfapi_p4_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P4 header unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p4_p5_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 header unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
@@ -1648,13 +1655,14 @@ int nfapi_p4_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
int result = 0;
nfapi_p4_p5_message_header_t *pMessageHeader = pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P4 unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p4_p5_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P4 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
+11 -6
View File
@@ -1039,8 +1039,6 @@ static uint32_t get_packed_msg_len(uintptr_t msgHead, uintptr_t msgEnd) {
int nfapi_nr_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pPackedBuf, uint32_t packedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pMessageBuf;
uint8_t *pWritePackedMessage = pPackedBuf;
uint8_t *pPackMessageEnd = pPackedBuf + packedBufLen;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
uint32_t packedMsgLen;
uint16_t packedMsgLen16;
@@ -1049,6 +1047,9 @@ int nfapi_nr_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pP
return -1;
}
uint8_t *pPackMessageEnd = pPackedBuf + packedBufLen;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
// pack the message
if(push16(pMessageHeader->phy_id, &pWritePackedMessage, pPackMessageEnd) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, pPackMessageEnd) &&
@@ -1081,7 +1082,6 @@ int nfapi_nr_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pP
int nfapi_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pPackedBuf, uint32_t packedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pMessageBuf;
uint8_t *pWritePackedMessage = pPackedBuf;
uint8_t *pPackMessageEnd = pPackedBuf + packedBufLen;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
uint32_t packedMsgLen;
uint16_t packedMsgLen16;
@@ -1091,6 +1091,8 @@ int nfapi_p5_message_pack(void *pMessageBuf, uint32_t messageBufLen, void *pPack
return -1;
}
uint8_t *pPackMessageEnd = pPackedBuf + packedBufLen;
// pack the message
if(push16(pMessageHeader->phy_id, &pWritePackedMessage, pPackMessageEnd) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, pPackMessageEnd) &&
@@ -2105,13 +2107,14 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen
int nfapi_p5_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 header unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p4_p5_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 header unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
@@ -2127,13 +2130,14 @@ int nfapi_p5_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, vo
int nfapi_nr_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = (uint8_t *)pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p4_p5_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
@@ -2262,13 +2266,14 @@ int nfapi_nr_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
int nfapi_p5_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p4_p5_codec_config_t *config) {
nfapi_p4_p5_message_header_t *pMessageHeader = pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = (uint8_t *)pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p4_p5_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P5 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
+11 -5
View File
@@ -3437,13 +3437,15 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe
nfapi_p7_message_header_t *pMessageHeader = pMessageBuf;
uint8_t *pWritePackedMessage = pPackedBuf;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
uint8_t *end = pPackedBuf + packedBufLen;
if (pMessageBuf == NULL || pPackedBuf == NULL)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n");
return -1;
}
uint8_t *end = (uint8_t *)pPackedBuf + packedBufLen;
// process the header
if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, end) &&
@@ -3587,13 +3589,14 @@ int nfapi_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBu
nfapi_p7_message_header_t *pMessageHeader = pMessageBuf;
uint8_t *pWritePackedMessage = pPackedBuf;
uint8_t *pPackedLengthField = &pWritePackedMessage[4];
uint8_t *end = pPackedBuf + packedBufLen;
if (pMessageBuf == NULL || pPackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n");
return -1;
}
uint8_t *end = (uint8_t *)pPackedBuf + packedBufLen;
// process the header
if(!(push16(pMessageHeader->phy_id, &pWritePackedMessage, end) &&
push16(pMessageHeader->message_id, &pWritePackedMessage, end) &&
@@ -7797,13 +7800,14 @@ static int check_nr_unpack_length(nfapi_nr_phy_msg_type_e msgId, uint32_t unpack
int nfapi_p7_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) {
nfapi_p7_message_header_t *pMessageHeader = pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 header unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = (uint8_t *)pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_P7_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p7_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 header unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
@@ -7825,13 +7829,14 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
int result = 0;
nfapi_p7_message_header_t *pMessageHeader = (nfapi_p7_message_header_t *)pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 unpack supplied pointers are null\n");
return -1;
}
uint8_t *end = (uint8_t *)pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_P7_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p7_message_header_t)) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
return -1;
@@ -8061,7 +8066,6 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
int result = 0;
nfapi_p7_message_header_t *pMessageHeader = (nfapi_p7_message_header_t*)pUnpackedBuf;
uint8_t *pReadPackedMessage = pMessageBuf;
uint8_t *end = pMessageBuf + messageBufLen;
if (pMessageBuf == NULL || pUnpackedBuf == NULL)
{
@@ -8069,6 +8073,8 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
return -1;
}
uint8_t *end = (uint8_t*)pMessageBuf + messageBufLen;
if (messageBufLen < NFAPI_P7_HEADER_LENGTH || unpackedBufLen < sizeof(nfapi_p7_message_header_t))
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 unpack supplied message buffer is too small %d, %d\n", messageBufLen, unpackedBufLen);
+1 -1
View File
@@ -31,7 +31,7 @@
//#define RM_DEBUG 1
uint8_t index_k0[2][4] = {{0,17,33,56},{0,13,25,43}};
static const uint8_t index_k0[2][4] = {{0, 17, 33, 56}, {0, 13, 25, 43}};
void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f)
{
@@ -97,8 +97,6 @@ uint16_t RIV2nb_rb_LUT100[6000];
uint16_t RIV2first_rb_LUT100[6000];
uint16_t RIV_max100=0;
const int8_t *delta_PUCCH_lut = delta_PUSCH_acc;
uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi)
{
@@ -83,7 +83,3 @@ extern uint32_t distRIV2alloc_gap1_odd_LUT100_3[6000];
extern uint16_t RIV2nb_rb_LUT100[6000];
extern uint16_t RIV2first_rb_LUT100[6000];
extern uint16_t RIV_max100;
extern const int8_t *delta_PUCCH_lut;
extern const int8_t delta_PUSCH_acc[4];
extern const int8_t delta_PUSCH_abs[4];
+6 -8
View File
@@ -295,14 +295,12 @@ const uint16_t prach_root_sequence_map0_3[838] = {
404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543, 336, 503, 305, 534, 373,
466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610};
uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,7,132,8,131,9,130,10,129,
11,128,12,127,13,126,14,125,15,124,16,123,17,122,18,121,19,120,20,119,
21,118,22,117,23,116,24,115,25,114,26,113,27,112,28,111,29,110,30,109,
31,108,32,107,33,106,34,105,35,104,36,103,37,102,38,101,39,100,40,99,
41,98,42,97,43,96,44,95,45,94,46,93,47,92,48,91,49,90,50,89,
51,88,52,87,53,86,54,85,55,84,56,83,57,82,58,81,59,80,60,79,
61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
};
const uint16_t prach_root_sequence_map4[138] = {
1, 138, 2, 137, 3, 136, 4, 135, 5, 134, 6, 133, 7, 132, 8, 131, 9, 130, 10, 129, 11, 128, 12, 127, 13, 126, 14, 125,
15, 124, 16, 123, 17, 122, 18, 121, 19, 120, 20, 119, 21, 118, 22, 117, 23, 116, 24, 115, 25, 114, 26, 113, 27, 112, 28, 111,
29, 110, 30, 109, 31, 108, 32, 107, 33, 106, 34, 105, 35, 104, 36, 103, 37, 102, 38, 101, 39, 100, 40, 99, 41, 98, 42, 97,
43, 96, 44, 95, 45, 94, 46, 93, 47, 92, 48, 91, 49, 90, 50, 89, 51, 88, 52, 87, 53, 86, 54, 85, 55, 84, 56, 83,
57, 82, 58, 81, 59, 80, 60, 79, 61, 78, 62, 77, 63, 76, 64, 75, 65, 74, 66, 73, 67, 72, 68, 71, 69, 70};
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
FILE *fd;
+4 -6
View File
@@ -1521,7 +1521,7 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
pdlsch0_harq->Nl = 1;
pdlsch0_harq->mimo_mode = frame_parms->nb_antenna_ports_eNB == 1 ?SISO : ALAMOUTI;
pdlsch0_harq->dl_power_off = 1; //no power offset
pdlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC &3];
pdlsch0_harq->delta_PUCCH = delta_PUSCH_acc[TPC & 3];
// compute resource allocation
if(dci_format == format1A)
@@ -1979,8 +1979,8 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
dlsch1_harq->codeword = 1;
dlsch0_harq->Nl = 1;
dlsch1_harq->Nl = 1;
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
dlsch1_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
dlsch0_harq->delta_PUCCH = delta_PUSCH_acc[TPC & 3];
dlsch1_harq->delta_PUCCH = delta_PUSCH_acc[TPC & 3];
dlsch0_harq->dl_power_off = 1;
dlsch1_harq->dl_power_off = 1;
@@ -2598,9 +2598,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
//dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs;
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->TPC&3];
dlsch0_harq->delta_PUCCH = delta_PUSCH_acc[((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->TPC & 3];
/*
if (dlsch0_harq->mcs>20) {
+1 -2
View File
@@ -32,6 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "SCHED_UE/sched_UE.h"
#include "transport_ue.h"
#include "transport_proto_ue.h"
@@ -86,8 +87,6 @@ void rx_phich(PHY_VARS_UE *ue,
uint8_t NSF_PHICH = 4;
uint8_t pusch_subframe;
int8_t delta_PUSCH_acc[4] = {-1,0,1,3};
// check if we're expecting a PHICH in this subframe
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX\n",ue->Mod_id,harq_pid,proc->frame_rx,subframe);
+9 -10
View File
@@ -35,9 +35,7 @@
#include <math.h>
#include "defs.h"
#define DEFINE_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#undef DEFINE_VARIABLES_LOWPAPR_SEQUENCES_NR_H
/*******************************************************************
*
@@ -54,9 +52,7 @@
*
*********************************************************************/
int16_t *base_sequence_less_than_36(unsigned int M_ZC,
unsigned int u,
unsigned int scaling)
static int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling)
{
char *phi_table;
int16_t *rv_overbar;
@@ -153,10 +149,11 @@ int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res) {
*
*********************************************************************/
int16_t *base_sequence_36_or_larger(unsigned int Msc_RS,
unsigned int u,
unsigned int v,
unsigned int scaling, unsigned int if_dmrs_seq)
static int16_t *base_sequence_36_or_larger(unsigned int Msc_RS,
unsigned int u,
unsigned int v,
unsigned int scaling,
unsigned int if_dmrs_seq)
{
int16_t *rv_overbar;
unsigned int N_ZC, M_ZC;
@@ -199,6 +196,8 @@ int16_t *base_sequence_36_or_larger(unsigned int Msc_RS,
return rv_overbar;
}
int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling)
{
/* prevent multiple calls, relevant when both UE & gNB initialize this */
@@ -222,7 +221,7 @@ void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling)
}
}
int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
void generate_ul_reference_signal_sequences(unsigned int scaling)
{
/* prevent multiple calls, relevant when both UE & gNB initialize this */
+432 -243
View File
@@ -41,14 +41,6 @@
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
#ifdef DEFINE_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#define EXTERN
#define INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#else
#define EXTERN extern
#endif
/************** DEFINE ********************************************/
#define U_GROUP_NUMBER (30) /* maximum number of sequence-group */
#define V_BASE_SEQUENCE_NUMBER (2) /* maximum number of base sequences */
@@ -58,212 +50,326 @@
#define INDEX_SB_LESS_32 (4) /* index of dftsizes array for which subcarrier number is less than 36 */
EXTERN const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible values of sequence length is */
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= { /*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
m_SRS_b 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 */
6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240,
/*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 6 3 3
m_SRS_b 84 88 92 96 100 104 108 112 116 120 128 132 136 144 152 160 168 176 184 192 100 208 216 */
252, 264, 276, 288, 300, 312, 324, 336, 348, 360, 384, 396, 408, 432, 456, 480, 504, 528, 552, 576, 600, 624, 648,
/*
K_TC 3 6 3 3 3 3 6 6 6 6 6 6 6 6 6 6 6 6 6 6
m_SRS_b 224 116, 240 256 264 272 144 152 160 168 176 184 192 208 216 224 240 256 264 272 */
672, 696, 720, 768, 792, 816, 864, 912, 960, 1008, 1056, 1104, 1152, 1248, 1296, 1344, 1440, 1536, 1584, 1632,
static const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible
values of sequence length is */
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
= {
/*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 m_SRS_b 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60
64 68 72 76 80 */
6,
12,
18,
24,
30,
36,
48,
60,
72,
84,
96,
108,
120,
132,
144,
156,
168,
180,
192,
204,
216,
228,
240,
/*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 6 3 3 m_SRS_b 84 88 92 96 100 104 108 112 116 120 128 132 136 144 152 160
168 176 184 192 100 208 216 */
252,
264,
276,
288,
300,
312,
324,
336,
348,
360,
384,
396,
408,
432,
456,
480,
504,
528,
552,
576,
600,
624,
648,
/*
K_TC 3 6 3 3 3 3 6 6 6 6 6 6 6 6 6 6 6 6 6 6
m_SRS_b 224 116, 240 256 264 272 144 152 160 168 176 184 192 208 216 224 240 256 264
272 */
672,
696,
720,
768,
792,
816,
864,
912,
960,
1008,
1056,
1104,
1152,
1248,
1296,
1344,
1440,
1536,
1584,
1632,
/* below numbers have been added just to include all possible lengths already used for lte */
540, 900, 972, 1080, 1200,
}
#endif
;
/* below numbers have been added just to include all possible lengths already used for lte */
540,
900,
972,
1080,
1200,
};
/* table of largest prime number lower than uplink allocated resource elements "ul_allocated_re" */
EXTERN const uint16_t ref_ul_primes[SRS_SB_CONF]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240, */
5, 11, 17, 23, 29, 31, 47, 59, 71, 83, 89, 107, 113, 127, 139, 151, 167, 179, 191, 199, 211, 227, 239,
static const uint16_t ref_ul_primes[SRS_SB_CONF] = {
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204,
216, 228, 240, */
5,
11,
17,
23,
29,
31,
47,
59,
71,
83,
89,
107,
113,
127,
139,
151,
167,
179,
191,
199,
211,
227,
239,
/* 252, 264, 276, 288, 300, 312, 324, 336, 348, 360, 384, 396, 408, 432, 456, 480, 504, 528, 552, 576, 600, 624, 648, */
251, 263, 271, 283, 293, 311, 317, 331, 347, 359, 383, 389, 401, 431, 449, 479, 503, 523, 547, 571, 599, 619, 647,
/* 252, 264, 276, 288, 300, 312, 324, 336, 348, 360, 384, 396, 408, 432, 456, 480, 504, 528, 552, 576,
600, 624, 648, */
251,
263,
271,
283,
293,
311,
317,
331,
347,
359,
383,
389,
401,
431,
449,
479,
503,
523,
547,
571,
599,
619,
647,
/* 672, 696, 720, 768, 792, 816, 864, 912, 960, 1008, 1056, 1104, 1152, 1248, 1296, 1344, 1440, 1536, 1584, 1632, */
661, 691, 719, 761, 787, 811, 863, 911, 953, 997, 1051, 1103, 1151, 1237, 1291, 1327, 1439, 1531, 1583, 1627,
/* 672, 696, 720, 768, 792, 816, 864, 912, 960, 1008, 1056, 1104, 1152, 1248, 1296, 1344, 1440, 1536, 1584,
1632, */
661,
691,
719,
761,
787,
811,
863,
911,
953,
997,
1051,
1103,
1151,
1237,
1291,
1327,
1439,
1531,
1583,
1627,
/* 540, 900, 972, 1080, 1200, */
523, 887, 971, 1069, 1193,
}
#endif
;
/* 540, 900, 972, 1080, 1200, */
523,
887,
971,
1069,
1193,
};
/* Low-PAPR base sequence; see TS 38.211 clause 5.2.2 */
EXTERN int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
extern int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
/* 38.211 table Table 5.2.2.2-1: Definition of phi(n) for M_ZC = 6 */
EXTERN const char phi_M_ZC_6[6*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 */
/* 0 */ -3, -1, 3, 3, -1, -3,
/* 1 */ -3, 3, -1, -1, 3, -3,
/* 2 */ -3, -3, -3, 3, 1, -3,
/* 3 */ 1, 1, 1, 3, -1, -3,
/* 4 */ 1, 1, 1, -3, -1, 3,
/* 5 */ -3, 1, -1, -3, -3, -3,
/* 6 */ -3, 1, 3, -3, -3, -3,
/* 7 */ -3, -1, 1, -3, 1, -1,
/* 8 */ -3, -1, -3, 1, -3, -3,
/* 9 */ -3, -3, 1, -3, 3, -3,
/* 10 */ -3, 1, 3, 1, -3, -3,
/* 11 */ -3, -1, -3, 1, 1, -3,
/* 12 */ 1, 1, 3, -1, -3, 3,
/* 13 */ 1, 1, 3, 3, -1, 3,
/* 14 */ 1, 1, 1, -3, 3, -1,
/* 15 */ 1, 1, 1, -1, 3, -3,
/* 16 */ -3, -1, -1, -1, 3, -1,
/* 17 */ -3, -3, -1, 1, -1, -3,
/* 18 */ -3, -3, -3, 1, -3, -1,
/* 19 */ -3, 1, 1, -3, -1, -3,
/* 20 */ -3, 3, -3, 1, 1, -3,
/* 21 */ -3, 1, -3, -3, -3, -1,
/* 22 */ 1, 1, -3, 3, 1, 3,
/* 23 */ 1, 1, -3, -3, 1, -3,
/* 24 */ 1, 1, 3, -1, 3, 3,
/* 25 */ 1, 1, -3, 1, 3, 3,
/* 26 */ 1, 1, -1, -1, 3, -1,
/* 27 */ 1, 1, -1, 3, -1, -1,
/* 28 */ 1, 1, -1, 3, -3, -1,
/* 29 */ 1, 1, -3, 1, -1, -1,
}
#endif
;
static const char phi_M_ZC_6[6 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 */
/* 0 */ -3, -1, 3, 3, -1, -3,
/* 1 */ -3, 3, -1, -1, 3, -3,
/* 2 */ -3, -3, -3, 3, 1, -3,
/* 3 */ 1, 1, 1, 3, -1, -3,
/* 4 */ 1, 1, 1, -3, -1, 3,
/* 5 */ -3, 1, -1, -3, -3, -3,
/* 6 */ -3, 1, 3, -3, -3, -3,
/* 7 */ -3, -1, 1, -3, 1, -1,
/* 8 */ -3, -1, -3, 1, -3, -3,
/* 9 */ -3, -3, 1, -3, 3, -3,
/* 10 */ -3, 1, 3, 1, -3, -3,
/* 11 */ -3, -1, -3, 1, 1, -3,
/* 12 */ 1, 1, 3, -1, -3, 3,
/* 13 */ 1, 1, 3, 3, -1, 3,
/* 14 */ 1, 1, 1, -3, 3, -1,
/* 15 */ 1, 1, 1, -1, 3, -3,
/* 16 */ -3, -1, -1, -1, 3, -1,
/* 17 */ -3, -3, -1, 1, -1, -3,
/* 18 */ -3, -3, -3, 1, -3, -1,
/* 19 */ -3, 1, 1, -3, -1, -3,
/* 20 */ -3, 3, -3, 1, 1, -3,
/* 21 */ -3, 1, -3, -3, -3, -1,
/* 22 */ 1, 1, -3, 3, 1, 3,
/* 23 */ 1, 1, -3, -3, 1, -3,
/* 24 */ 1, 1, 3, -1, 3, 3,
/* 25 */ 1, 1, -3, 1, 3, 3,
/* 26 */ 1, 1, -1, -1, 3, -1,
/* 27 */ 1, 1, -1, 3, -1, -1,
/* 28 */ 1, 1, -1, 3, -3, -1,
/* 29 */ 1, 1, -3, 1, -1, -1,
};
/* Table 5.2.2.2-2: Definition of phi ( n ) for M ZC = 12 */
EXTERN const char phi_M_ZC_12[12*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
/* 0 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
/* 1 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
/* 2 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
/* 3 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
/* 4 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
/* 5 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
/* 6 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
/* 7 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
/* 8 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
/* 9 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
/* 10 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
/* 11 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
/* 12 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
/* 13 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
/* 14 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
/* 15 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
/* 16 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
/* 17 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
/* 18 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
/* 20 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
/* 21 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
/* 22 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
/* 23 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
/* 24 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
/* 25 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
/* 26 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
/* 27 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
/* 28 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
/* 29 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
}
#endif
;
static const char phi_M_ZC_12[12 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
/* 0 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
/* 1 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
/* 2 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
/* 3 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
/* 4 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
/* 5 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
/* 6 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
/* 7 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
/* 8 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
/* 9 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
/* 10 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
/* 11 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
/* 12 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
/* 13 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
/* 14 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
/* 15 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
/* 16 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
/* 17 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
/* 18 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
/* 20 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
/* 21 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
/* 22 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
/* 23 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
/* 24 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
/* 25 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
/* 26 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
/* 27 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
/* 28 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
/* 29 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
};
/* Table 5.2.2.2-3: Definition of phi (n ) for M_ZC = 18 */
EXTERN const char phi_M_ZC_18[18*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
/* 0 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
/* 1 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
/* 2 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
/* 3 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
/* 4 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
/* 5 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
/* 6 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
/* 7 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
/* 8 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
/* 9 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
/* 10 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
/* 11 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
/* 12 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
/* 13 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
/* 14 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
/* 15 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
/* 16 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
/* 17 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
/* 18 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
/* 19 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
/* 20 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
/* 21 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
/* 22 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
/* 23 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
/* 24 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
/* 25 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
/* 26 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
/* 27 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
/* 28 */ -1, -3, 1, -3, -3, -3, 1, 1, 3, 3, -3, 3, 3, -3, -1, 3, -3, 1,
/* 29 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
}
#endif
;
static const char phi_M_ZC_18[18 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
/* 0 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
/* 1 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
/* 2 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
/* 3 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
/* 4 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
/* 5 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
/* 6 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
/* 7 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
/* 8 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
/* 9 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
/* 10 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
/* 11 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
/* 12 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
/* 13 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
/* 14 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
/* 15 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
/* 16 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
/* 17 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
/* 18 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
/* 19 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
/* 20 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
/* 21 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
/* 22 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
/* 23 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
/* 24 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
/* 25 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
/* 26 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
/* 27 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
/* 28 */ -1, -3, 1, -3, -3, -3, 1, 1, 3, 3, -3, 3, 3, -3, -1, 3, -3, 1,
/* 29 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
};
/* Table 5.2.2.2-4: Definition of phi (n ) for M_ZC = 24 */
EXTERN const char phi_M_ZC_24[24*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
/* 0 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
/* 1 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
/* 2 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
/* 3 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
/* 4 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
/* 5 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
/* 6 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
/* 7 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
/* 8 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
/* 9 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
/* 10 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
/* 11 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
/* 12 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
/* 13 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
/* 14 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
/* 15 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
/* 16 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
/* 17 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
/* 18 */ 3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
/* 19 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
/* 20 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
/* 21 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
/* 22 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
/* 23 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
/* 24 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
/* 25 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
/* 26 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
/* 27 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
/* 28 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
/* 29 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
}
#endif
;
static const char phi_M_ZC_24[24 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
/* 0 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
/* 1 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
/* 2 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
/* 3 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
/* 4 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
/* 5 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
/* 6 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
/* 7 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
/* 8 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
/* 9 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
/* 10 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
/* 11 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
/* 12 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
/* 13 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
/* 14 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
/* 15 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
/* 16 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
/* 17 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
/* 18 */ 3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
/* 19 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
/* 20 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
/* 21 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
/* 22 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
/* 23 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
/* 24 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
/* 25 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
/* 26 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
/* 27 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
/* 28 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
/* 29 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
};
/************** FUNCTION ******************************************/
EXTERN int16_t *base_sequence_36_or_larger(unsigned int M_ZC, unsigned int u, unsigned int v, unsigned int scaling, unsigned int if_dmrs_seq);
EXTERN int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling);
/*!
\brief This function generate the sounding reference symbol (SRS) for the uplink.
@param tables of srs
@@ -277,68 +383,151 @@ void free_ul_reference_signal_sequences(void);
// Supported for 100Mhz configuration - which has max 273 RBs
#define MAX_INDEX_DMRS_UL_ALLOCATED_REs 53
static const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
According to 3GPP spec 38.211 section 6.3.1.4
Table used in calculating DMRS low papr type1 sequence for transform precoding */
= {
/*RBs 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, */
6,
12,
18,
24,
30,
36,
48,
54,
60,
72,
90,
96,
EXTERN const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
According to 3GPP spec 38.211 section 6.3.1.4
Table used in calculating DMRS low papr type1 sequence for transform precoding */
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/*RBs 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, */
6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96,
/*RBs 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, */
108,
120,
144,
150,
162,
180,
192,
216,
240,
270,
288,
300,
/*RBs 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, */
108, 120, 144, 150, 162, 180, 192, 216, 240, 270, 288, 300,
/*RBs 54, 60, 64, 72 75, 80, 81, 90, 96, 100, (Bw 40Mhz) */
324,
360,
384,
432,
450,
480,
486,
540,
576,
600,
/*RBs 54, 60, 64, 72 75, 80, 81, 90, 96, 100, (Bw 40Mhz) */
324, 360, 384, 432, 450, 480, 486, 540, 576, 600,
/*RBs 108, 120 125 128 135 144 150 160 162 180 192 200 */
648,
720,
750,
768,
810,
864,
900,
960,
972,
1080,
1152,
1200,
/*RBs 108, 120 125 128 135 144 150 160 162 180 192 200 */
648, 720, 750, 768, 810, 864, 900, 960, 972, 1080, 1152, 1200,
/*RBs 216 225 240 243 250 256 270 supported until 100Mhz */
1296, 1350, 1440, 1458, 1500, 1536, 1620
/*RBs 216 225 240 243 250 256 270 supported until 100Mhz */
1296,
1350,
1440,
1458,
1500,
1536,
1620
}
#endif
;
};
/* Table of largest prime number N_ZC < possible DMRS REs M_ZC, this array has values until 100Mhz
According to 3GPP spec 38.211 section 5.2.2.1
Table used in calculating DMRS low papr type1 sequence for transform precoding */
EXTERN const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
5, 11, 17, 23, 29, 31, 47, 53, 59, 71, 89, 89,
static const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs] = {
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
5,
11,
17,
23,
29,
31,
47,
53,
59,
71,
89,
89,
/*DMRS REs 108, 120, 144, 150, 162, 180, 192, 216, 240, 270, 288, 300, */
107, 113, 139, 149, 157, 179, 191, 211, 239, 269, 283, 293,
/*DMRS REs 108, 120, 144, 150, 162, 180, 192, 216, 240, 270, 288, 300, */
107,
113,
139,
149,
157,
179,
191,
211,
239,
269,
283,
293,
/*DMRS REs 324, 360, 384, 432, 450, 480, 486, 540, 576, 600, */
317, 359, 383, 431, 449, 479, 479, 523, 571, 599,
/*DMRS REs 648, 720, 750, 768, 810, 864, 900, 960, 972, 1080, 1152, 1200, */
647, 719, 743, 761, 809, 863, 887, 953, 971, 1069, 1151, 1193,
/*DMRS REs 1296, 1350, 1440, 1458, 1500, 1536 1620 supported until 100Mhz */
1291, 1327, 1439, 1453, 1499, 1531, 1619
/*DMRS REs 324, 360, 384, 432, 450, 480, 486, 540, 576, 600, */
317,
359,
383,
431,
449,
479,
479,
523,
571,
599,
}
#endif
;
/*DMRS REs 648, 720, 750, 768, 810, 864, 900, 960, 972, 1080, 1152, 1200, */
647,
719,
743,
761,
809,
863,
887,
953,
971,
1069,
1151,
1193,
/*DMRS REs 1296, 1350, 1440, 1458, 1500, 1536 1620 supported until 100Mhz */
1291,
1327,
1439,
1453,
1499,
1531,
1619
};
/// PUSCH DMRS for transform precoding
EXTERN int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
EXTERN int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
extern int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
extern int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res);
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling);
void free_gnb_lowpapr_sequences(void);
#undef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#undef EXTERN
#endif /* SSS_NR_H */
@@ -678,7 +678,7 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, c16_t *stream0_out
_m_empty();
}
int16_t ones[8] __attribute__((aligned(16))) = {0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff};
static const int16_t ones[8] __attribute__((aligned(16))) = {0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff};
// Calculates psi_a = psi_r * a_r + psi_i * a_i
#define prodsum_psi_a_epi16(psi_r, a_r, psi_i, a_i, psi_a) \
@@ -3945,4 +3945,4 @@ void nr_ulsch_shift_llr(int16_t **llr_layers, uint32_t nb_re, uint32_t rxdataF_e
llr_layers0[i] = simde_mm_srai_epi16(llr_layers0[i], shift);
llr_layers1[i] = simde_mm_srai_epi16(llr_layers1[i], shift);
}
}
}
+1 -3
View File
@@ -36,9 +36,7 @@
#include "PHY/defs_nr_UE.h"
#define DEFINE_VARIABLES_CIC_FILTER_NR_H
#include "PHY/NR_UE_TRANSPORT/cic_filter_nr.h"
#undef DEFINE_VARIABLES_CIC_FILTER_NR_H
/*******************************************************************
*
@@ -223,7 +221,7 @@ void fir_filter_basic(int32_t *input, int32_t *output, int length, int taps_fir_
*
*********************************************************************/
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, int *taps_fir, int scaling_shift)
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, const int *taps_fir, int scaling_shift)
{
int32_t current;
+26 -119
View File
@@ -36,13 +36,6 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/types.h"
#ifdef DEFINE_VARIABLES_CIC_FILTER_NR_H
#define EXTERN
#define INIT_VARIABLES_CIC_FILTER_NR_H
#else
#define EXTERN extern
#endif
/************** DEFINE ********************************************/
#define M_DIFFERENTIAL_DELAY (1)
@@ -53,50 +46,28 @@
#define FIR_TAPS_NUMBER (20)
#define FIR_FITER_SCALING_ACC (14)
EXTERN double sharpened_fir_taps[FIR_TAPS_NUMBER]
#ifdef INIT_VARIABLES_CIC_FILTER_NR_H
= {
/*
cic filter and compensation FIR have been designed based on cic design tools provided at
http://www.tsdconseil.fr/tutos/index.html
-->cfir = cic_comp_design(4,4,1,30720000,2,1650000,20);
R = 4.00, Fin = 30720000.00 Hz, Fout = 7680000.00 Hz.
Attenuation for f > fout/2 : -14.82 dB.
Attenuation at 1650000.00 Hz: -0.15 dB.
Attenuation max. between 0 et 1650000.00 Hz: -0.15 dB.
E.g. in linear scale : * 0.983
Number of additionnal bits needed for implementation: 7.
Fout = 7680000.00 Hz.
index = 1026 / 4096.
Correction Fint ?
Filtre global :
static const double sharpened_fir_taps[FIR_TAPS_NUMBER] = {
/*
cic filter and compensation FIR have been designed based on cic design tools provided at
http://www.tsdconseil.fr/tutos/index.html
-->cfir = cic_comp_design(4,4,1,30720000,2,1650000,20);
R = 4.00, Fin = 30720000.00 Hz, Fout = 7680000.00 Hz.
Attenuation for f > fout/2 : -14.82 dB.
Attenuation at 1650000.00 Hz: -0.15 dB.
Attenuation max. between 0 et 1650000.00 Hz: -0.15 dB.
E.g. in linear scale : * 0.983
Number of additionnal bits needed for implementation: 7.
Fout = 7680000.00 Hz.
index = 1026 / 4096.
Correction Fint ?
Filtre global :
-->cfir
cfir =
*/
- 0.0059900,
- 0.0056191,
0.0107582,
0.0266043,
0.0130358,
- 0.0331228,
- 0.0680440,
- 0.0278570,
0.1106335,
0.2897060,
0.3607857,
0.2607354,
0.0983409,
- 0.0243749,
- 0.0583235,
- 0.0276023,
0.0104286,
0.0199533,
0.0071721,
- 0.0028096,
}
#endif
;
-->cfir
cfir =
*/
-0.0059900, -0.0056191, 0.0107582, 0.0266043, 0.0130358, -0.0331228, -0.0680440, -0.0278570, 0.1106335, 0.2897060,
0.3607857, 0.2607354, 0.0983409, -0.0243749, -0.0583235, -0.0276023, 0.0104286, 0.0199533, 0.0071721, -0.0028096,
};
#define MAX_SAMPLEFILTER_TAP_NUM (100)
#define FIR_SCALING_ACC (15)
@@ -119,71 +90,10 @@ typedef struct {
* 2 MHz 15 MHz 0 -20 dB
*/
EXTERN int filter_taps[SAMPLEFILTER_TAP_NUM]
#ifdef INIT_VARIABLES_CIC_FILTER_NR_H
= {
-1572,
65,
-132,
197,
26,
393,
194,
536,
250,
514,
105,
279,
-234,
-105,
-646,
-466,
-924,
-583,
-856,
-279,
-321,
492,
639,
1601,
1812,
2766,
2872,
3650,
3503,
3976,
3503,
3650,
2872,
2766,
1812,
1601,
639,
492,
-321,
-279,
-856,
-583,
-924,
-466,
-646,
-105,
-234,
279,
105,
514,
250,
536,
194,
393,
26,
197,
-132,
65,
-1572
}
#endif
;
static const int filter_taps[SAMPLEFILTER_TAP_NUM] = {
-1572, 65, -132, 197, 26, 393, 194, 536, 250, 514, 105, 279, -234, -105, -646, -466, -924, -583, -856, -279,
-321, 492, 639, 1601, 1812, 2766, 2872, 3650, 3503, 3976, 3503, 3650, 2872, 2766, 1812, 1601, 639, 492, -321, -279,
-856, -583, -924, -466, -646, -105, -234, 279, 105, 514, 250, 536, 194, 393, 26, 197, -132, 65, -1572};
/************** FUNCTION ******************************************/
@@ -193,15 +103,12 @@ void comb_stage(int32_t *input, int32_t *output, int length, int differential_de
void rate_change_stage(int32_t *input, int32_t *output, int length, int rate_change);
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, int32_t *taps_fir, int scaling_shift);
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, const int32_t *taps_fir, int scaling_shift);
void cic_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, int rate_change, int number_cic_stage, int set_scaling_factor, int fir_rate_change);
void fir_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, int rate_change, int scaling_factor);
#undef EXTERN
#undef INIT_VARIABLES_CIC_FILTER_NR_H
#endif /* CIC_FILTER_NR_H */
+8 -9
View File
@@ -47,15 +47,14 @@
#include "assertions.h"
#include "T.h"
char nr_dci_format_string[8][30] = {
"NR_DL_DCI_FORMAT_1_0",
"NR_DL_DCI_FORMAT_1_1",
"NR_DL_DCI_FORMAT_2_0",
"NR_DL_DCI_FORMAT_2_1",
"NR_DL_DCI_FORMAT_2_2",
"NR_DL_DCI_FORMAT_2_3",
"NR_UL_DCI_FORMAT_0_0",
"NR_UL_DCI_FORMAT_0_1"};
static const char nr_dci_format_string[8][30] = {"NR_DL_DCI_FORMAT_1_0",
"NR_DL_DCI_FORMAT_1_1",
"NR_DL_DCI_FORMAT_2_0",
"NR_DL_DCI_FORMAT_2_1",
"NR_DL_DCI_FORMAT_2_2",
"NR_DL_DCI_FORMAT_2_3",
"NR_UL_DCI_FORMAT_0_0",
"NR_UL_DCI_FORMAT_0_1"};
//#define DEBUG_DCI_DECODING 1
@@ -38,9 +38,7 @@
//#define DEBUG_LLR_SIC
int16_t nr_zeros[8] __attribute__ ((aligned(16))) = {0,0,0,0,0,0,0,0};
int16_t nr_ones[8] __attribute__ ((aligned(16))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff};
int16_t nr_zeros[8] __attribute__((aligned(16))) = {0, 0, 0, 0, 0, 0, 0, 0};
#if defined(__x86_64__) || defined(__i386__)
__m128i rho_rpi __attribute__ ((aligned(16)));
__m128i rho_rmi __attribute__((aligned(16)));
@@ -196,9 +196,6 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
}
char duplex_string[2][4] = {"FDD","TDD"};
char prefix_string[2][9] = {"NORMAL","EXTENDED"};
int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue,
int n_frames, int sa)
+2 -1
View File
@@ -380,7 +380,8 @@ unsigned char sign(int8_t x) {
}
*/
uint8_t pbch_deinterleaving_pattern[32] = {28,0,31,30,7,29,25,27,5,8,24,9,10,11,12,13,1,4,3,14,15,16,17,2,26,18,19,20,21,22,6,23};
const uint8_t pbch_deinterleaving_pattern[32] = {28, 0, 31, 30, 7, 29, 25, 27, 5, 8, 24, 9, 10, 11, 12, 13,
1, 4, 3, 14, 15, 16, 17, 2, 26, 18, 19, 20, 21, 22, 6, 23};
int nr_rx_pbch(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
@@ -33,19 +33,13 @@
#include <stdio.h>
#include <math.h>
#define DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#include "PHY/impl_defs_nr.h"
#undef DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#include "PHY/defs_nr_UE.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#define DEFINE_VARIABLES_SRS_MODULATION_NR_H
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#undef DEFINE_VARIABLES_SRS_MODULATION_NR_H
//#define SRS_DEBUG
@@ -35,15 +35,6 @@
#include "PHY/defs_nr_UE.h"
#ifdef DEFINE_VARIABLES_SRS_MODULATION_NR_H
#define EXTERN
#define INIT_VARIABLES_SRS_MODULATION_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_SRS_MODULATION_NR_H
#endif
/************** DEFINE ********************************************/
#define C_SRS_NUMBER (64)
@@ -52,93 +43,81 @@
/************** VARIABLES *****************************************/
/* TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration */
EXTERN const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= {
/* B_SRS = 0 B_SRS = 1 B_SRS = 2 B_SRS = 3 */
/* C SRS m_srs0 N_0 m_srs1 N_1 m_srs2 N_2 m_srs3 N_3 */
/* 0 */ { { 4, 1 },{ 4, 1 },{ 4, 1 },{ 4, 1 } },
/* 1 */ { { 8, 1 },{ 4, 2 },{ 4, 1 },{ 4, 1 } },
/* 2 */ { { 12, 1 },{ 4, 3 },{ 4, 1 },{ 4, 1 } },
/* 3 */ { { 16, 1 },{ 4, 4 },{ 4, 1 },{ 4, 1 } },
/* 4 */ { { 16, 1 },{ 8, 2 },{ 4, 2 },{ 4, 1 } },
/* 5 */ { { 20, 1 },{ 4, 5 },{ 4, 1 },{ 4, 1 } },
/* 6 */ { { 24, 1 },{ 4, 6 },{ 4, 1 },{ 4, 1 } },
/* 7 */ { { 24, 1 },{ 12, 2 },{ 4, 3 },{ 4, 1 } },
/* 8 */ { { 28, 1 },{ 4, 7 },{ 4, 1 },{ 4, 1 } },
/* 9 */ { { 32, 1 },{ 16, 2 },{ 8, 2 },{ 4, 2 } },
/* 10 */ { { 36, 1 },{ 12, 3 },{ 4, 3 },{ 4, 1 } },
/* 11 */ { { 40, 1 },{ 20, 2 },{ 4, 5 },{ 4, 1 } },
/* 12 */ { { 48, 1 },{ 16, 3 },{ 8, 2 },{ 4, 2 } },
/* 13 */ { { 48, 1 },{ 24, 2 },{ 12, 2 },{ 4, 3 } },
/* 14 */ { { 52, 1 },{ 4, 13 },{ 4, 1 },{ 4, 1 } },
/* 15 */ { { 56, 1 },{ 28, 2 },{ 4, 7 },{ 4, 1 } },
/* 16 */ { { 60, 1 },{ 20, 3 },{ 4, 5 },{ 4, 1 } },
/* 17 */ { { 64, 1 },{ 32, 2 },{ 16, 2 },{ 4, 4 } },
/* 18 */ { { 72, 1 },{ 24, 3 },{ 12, 2 },{ 4, 3 } },
/* 19 */ { { 72, 1 },{ 36, 2 },{ 12, 3 },{ 4, 3 } },
/* 20 */ { { 76, 1 },{ 4, 19 },{ 4, 1 },{ 4, 1 } },
/* 21 */ { { 80, 1 },{ 40, 2 },{ 20, 2 },{ 4, 5 } },
/* 22 */ { { 88, 1 },{ 44, 2 },{ 4, 11 },{ 4, 1 } },
/* 23 */ { { 96, 1 },{ 32, 3 },{ 16, 2 },{ 4, 4 } },
/* 24 */ { { 96, 1 },{ 48, 2 },{ 24, 2 },{ 4, 6 } },
/* 25 */ { { 104, 1 },{ 52, 2 },{ 4, 13 },{ 4, 1 } },
/* 26 */ { { 112, 1 },{ 56, 2 },{ 28, 2 },{ 4, 7 } },
/* 27 */ { { 120, 1 },{ 60, 2 },{ 20, 3 },{ 4, 5 } },
/* 28 */ { { 120, 1 },{ 40, 3 },{ 8, 5 },{ 4, 2 } },
/* 29 */ { { 120, 1 },{ 24, 5 },{ 12, 2 },{ 4, 3 } },
/* 30 */ { { 128, 1 },{ 64, 2 },{ 32, 2 },{ 4, 8 } },
/* 31 */ { { 128, 1 },{ 64, 2 },{ 16, 4 },{ 4, 4 } },
/* 32 */ { { 128, 1 },{ 16, 8 },{ 8, 2 },{ 4, 2 } },
/* 33 */ { { 132, 1 },{ 44, 3 },{ 4, 11 },{ 4, 1 } },
/* 34 */ { { 136, 1 },{ 68, 2 },{ 4, 17 },{ 4, 1 } },
/* 35 */ { { 144, 1 },{ 72, 2 },{ 36, 2 },{ 4, 9 } },
/* 36 */ { { 144, 1 },{ 48, 3 },{ 24, 2 },{ 12, 2 } },
/* 37 */ { { 144, 1 },{ 48, 3 },{ 16, 3 },{ 4, 4 } },
/* 38 */ { { 144, 1 },{ 16, 9 },{ 8, 2 },{ 4, 2 } },
/* 39 */ { { 152, 1 },{ 76, 2 },{ 4, 19 },{ 4, 1 } },
/* 40 */ { { 160, 1 },{ 80, 2 },{ 40, 2 },{ 4, 10 } },
/* 41 */ { { 160, 1 },{ 80, 2 },{ 20, 4 },{ 4, 5 } },
/* 42 */ { { 160, 1 },{ 32, 5 },{ 16, 2 },{ 4, 4 } },
/* 43 */ { { 168, 1 },{ 84, 2 },{ 28, 3 },{ 4, 7 } },
/* 44 */ { { 176, 1 },{ 88, 2 },{ 44, 2 },{ 4, 11 } },
/* 45 */ { { 184, 1 },{ 92, 2 },{ 4, 23 },{ 4, 1 } },
/* 46 */ { { 192, 1 },{ 96, 2 },{ 48, 2 },{ 4, 12 } },
/* 47 */ { { 192, 1 },{ 96, 2 },{ 24, 4 },{ 4, 6 } },
/* 48 */ { { 192, 1 },{ 64, 3 },{ 16, 4 },{ 4, 4 } },
/* 49 */ { { 192, 1 },{ 24, 8 },{ 8, 3 },{ 4, 2 } },
/* 50 */ { { 208, 1 },{ 104, 2 },{ 52, 2 },{ 4, 13 } },
/* 51 */ { { 216, 1 },{ 108, 2 },{ 36, 3 },{ 4, 9 } },
/* 52 */ { { 224, 1 },{ 112, 2 },{ 56, 2 },{ 4, 14 } },
/* 53 */ { { 240, 1 },{ 120, 2 },{ 60, 2 },{ 4, 15 } },
/* 54 */ { { 240, 1 },{ 80, 3 },{ 20, 4 },{ 4, 5 } },
/* 55 */ { { 240, 1 },{ 48, 5 },{ 16, 3 },{ 8, 2 } },
/* 56 */ { { 240, 1 },{ 24, 10 },{ 12, 2 },{ 4, 3 } },
/* 57 */ { { 256, 1 },{ 128, 2 },{ 64, 2 },{ 4, 16 } },
/* 58 */ { { 256, 1 },{ 128, 2 },{ 32, 4 },{ 4, 8 } },
/* 59 */ { { 256, 1 },{ 16, 16 },{ 8, 2 },{ 4, 2 } },
/* 60 */ { { 264, 1 },{ 132, 2 },{ 44, 3 },{ 4, 11 } },
/* 61 */ { { 272, 1 },{ 136, 2 },{ 68, 2 },{ 4, 17 } },
/* 62 */ { { 272, 1 },{ 68, 4 },{ 4, 17 },{ 4, 1 } },
/* 63 */ { { 272, 1 },{ 16, 17 },{ 8, 2 },{ 4, 2 } },
}
#endif
;
static const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2] = {
/* B_SRS = 0 B_SRS = 1 B_SRS = 2 B_SRS = 3 */
/* C SRS m_srs0 N_0 m_srs1 N_1 m_srs2 N_2 m_srs3 N_3 */
/* 0 */ {{4, 1}, {4, 1}, {4, 1}, {4, 1}},
/* 1 */ {{8, 1}, {4, 2}, {4, 1}, {4, 1}},
/* 2 */ {{12, 1}, {4, 3}, {4, 1}, {4, 1}},
/* 3 */ {{16, 1}, {4, 4}, {4, 1}, {4, 1}},
/* 4 */ {{16, 1}, {8, 2}, {4, 2}, {4, 1}},
/* 5 */ {{20, 1}, {4, 5}, {4, 1}, {4, 1}},
/* 6 */ {{24, 1}, {4, 6}, {4, 1}, {4, 1}},
/* 7 */ {{24, 1}, {12, 2}, {4, 3}, {4, 1}},
/* 8 */ {{28, 1}, {4, 7}, {4, 1}, {4, 1}},
/* 9 */ {{32, 1}, {16, 2}, {8, 2}, {4, 2}},
/* 10 */ {{36, 1}, {12, 3}, {4, 3}, {4, 1}},
/* 11 */ {{40, 1}, {20, 2}, {4, 5}, {4, 1}},
/* 12 */ {{48, 1}, {16, 3}, {8, 2}, {4, 2}},
/* 13 */ {{48, 1}, {24, 2}, {12, 2}, {4, 3}},
/* 14 */ {{52, 1}, {4, 13}, {4, 1}, {4, 1}},
/* 15 */ {{56, 1}, {28, 2}, {4, 7}, {4, 1}},
/* 16 */ {{60, 1}, {20, 3}, {4, 5}, {4, 1}},
/* 17 */ {{64, 1}, {32, 2}, {16, 2}, {4, 4}},
/* 18 */ {{72, 1}, {24, 3}, {12, 2}, {4, 3}},
/* 19 */ {{72, 1}, {36, 2}, {12, 3}, {4, 3}},
/* 20 */ {{76, 1}, {4, 19}, {4, 1}, {4, 1}},
/* 21 */ {{80, 1}, {40, 2}, {20, 2}, {4, 5}},
/* 22 */ {{88, 1}, {44, 2}, {4, 11}, {4, 1}},
/* 23 */ {{96, 1}, {32, 3}, {16, 2}, {4, 4}},
/* 24 */ {{96, 1}, {48, 2}, {24, 2}, {4, 6}},
/* 25 */ {{104, 1}, {52, 2}, {4, 13}, {4, 1}},
/* 26 */ {{112, 1}, {56, 2}, {28, 2}, {4, 7}},
/* 27 */ {{120, 1}, {60, 2}, {20, 3}, {4, 5}},
/* 28 */ {{120, 1}, {40, 3}, {8, 5}, {4, 2}},
/* 29 */ {{120, 1}, {24, 5}, {12, 2}, {4, 3}},
/* 30 */ {{128, 1}, {64, 2}, {32, 2}, {4, 8}},
/* 31 */ {{128, 1}, {64, 2}, {16, 4}, {4, 4}},
/* 32 */ {{128, 1}, {16, 8}, {8, 2}, {4, 2}},
/* 33 */ {{132, 1}, {44, 3}, {4, 11}, {4, 1}},
/* 34 */ {{136, 1}, {68, 2}, {4, 17}, {4, 1}},
/* 35 */ {{144, 1}, {72, 2}, {36, 2}, {4, 9}},
/* 36 */ {{144, 1}, {48, 3}, {24, 2}, {12, 2}},
/* 37 */ {{144, 1}, {48, 3}, {16, 3}, {4, 4}},
/* 38 */ {{144, 1}, {16, 9}, {8, 2}, {4, 2}},
/* 39 */ {{152, 1}, {76, 2}, {4, 19}, {4, 1}},
/* 40 */ {{160, 1}, {80, 2}, {40, 2}, {4, 10}},
/* 41 */ {{160, 1}, {80, 2}, {20, 4}, {4, 5}},
/* 42 */ {{160, 1}, {32, 5}, {16, 2}, {4, 4}},
/* 43 */ {{168, 1}, {84, 2}, {28, 3}, {4, 7}},
/* 44 */ {{176, 1}, {88, 2}, {44, 2}, {4, 11}},
/* 45 */ {{184, 1}, {92, 2}, {4, 23}, {4, 1}},
/* 46 */ {{192, 1}, {96, 2}, {48, 2}, {4, 12}},
/* 47 */ {{192, 1}, {96, 2}, {24, 4}, {4, 6}},
/* 48 */ {{192, 1}, {64, 3}, {16, 4}, {4, 4}},
/* 49 */ {{192, 1}, {24, 8}, {8, 3}, {4, 2}},
/* 50 */ {{208, 1}, {104, 2}, {52, 2}, {4, 13}},
/* 51 */ {{216, 1}, {108, 2}, {36, 3}, {4, 9}},
/* 52 */ {{224, 1}, {112, 2}, {56, 2}, {4, 14}},
/* 53 */ {{240, 1}, {120, 2}, {60, 2}, {4, 15}},
/* 54 */ {{240, 1}, {80, 3}, {20, 4}, {4, 5}},
/* 55 */ {{240, 1}, {48, 5}, {16, 3}, {8, 2}},
/* 56 */ {{240, 1}, {24, 10}, {12, 2}, {4, 3}},
/* 57 */ {{256, 1}, {128, 2}, {64, 2}, {4, 16}},
/* 58 */ {{256, 1}, {128, 2}, {32, 4}, {4, 8}},
/* 59 */ {{256, 1}, {16, 16}, {8, 2}, {4, 2}},
/* 60 */ {{264, 1}, {132, 2}, {44, 3}, {4, 11}},
/* 61 */ {{272, 1}, {136, 2}, {68, 2}, {4, 17}},
/* 62 */ {{272, 1}, {68, 4}, {4, 17}, {4, 1}},
/* 63 */ {{272, 1}, {16, 17}, {8, 2}, {4, 2}},
};
#define SRS_PERIODICITY (17)
EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= { 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
#endif
;
static const uint16_t srs_periodicity[SRS_PERIODICITY] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560};
// TS 38.211 - Table 6.4.1.4.2-1
EXTERN const uint16_t srs_max_number_cs[3]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= {8, 12, 6}
#endif
;
static const uint16_t srs_max_number_cs[3] = {8, 12, 6};
/*************** FUNCTIONS *****************************************/
@@ -179,7 +158,4 @@ int is_srs_period_nr(SRS_Resource_t *p_SRS_Resource,
int ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txdataF);
#undef EXTERN
#undef INIT_VARIABLES_SRS_MODULATION_NR_H
#endif /* SRS_MODULATION_NR_H */
+5 -5
View File
@@ -89,8 +89,7 @@ void rotate_cpx_vector(const c16_t *const x, const c16_t *const alpha, c16_t *y,
// stores result in y
// N is the number of complex numbers
// output_shift reduces the result of the multiplication by this number of bits
//AssertFatal(N%8==0, "To be developped");
if ( (intptr_t)x%32 == 0 && !(intptr_t)y%32 == 0 && __builtin_cpu_supports("avx2")) {
if ( __builtin_cpu_supports("avx2")) {
// output is 32 bytes aligned, but not the input
const c16_t for_re={alpha->r, -alpha->i};
@@ -132,13 +131,14 @@ void rotate_cpx_vector(const c16_t *const x, const c16_t *const alpha, c16_t *y,
__m256i* xd= (__m256i*)x;
const __m256i *end=xd+N/8;
for( __m256i* yd = (__m256i *)y; xd<end ; yd++, xd++) {
const __m256i xre = simde_mm256_srai_epi32(simde_mm256_madd_epi16(*xd,alpha_for_real),
const __m256i y256= _mm256_lddqu_si256(xd);
const __m256i xre = simde_mm256_srai_epi32(simde_mm256_madd_epi16(y256,alpha_for_real),
output_shift);
const __m256i xim = simde_mm256_srai_epi32(simde_mm256_madd_epi16(*xd,alpha_for_im),
const __m256i xim = simde_mm256_srai_epi32(simde_mm256_madd_epi16(y256,alpha_for_im),
output_shift);
// a bit faster than unpacklo+unpackhi+packs
const __m256i tmp=simde_mm256_packs_epi32(xre,xim);
*yd=simde_mm256_shuffle_epi8(tmp,perm_mask);
_mm256_storeu_si256(yd,simde_mm256_shuffle_epi8(tmp,perm_mask));
}
c16_t* alpha16=(c16_t*) alpha, *yLast;
yLast=((c16_t*)y)+(N/8)*8;
+1 -2
View File
@@ -43,8 +43,7 @@
/* function description array, to be used when loading the dfts/idfts lib */
static loader_shlibfunc_t shlib_fdesc[2];
static char *arg[64]={"phytest","-O","cmdlineonly::dbgl0"};
static char *const arg[64] = {"phytest", "-O", "cmdlineonly::dbgl0"};
int load_dftslib(void) {
+29 -10
View File
@@ -5407,11 +5407,11 @@ void idft98304(int16_t *input, int16_t *output,uint8_t scale) {
/// THIS SECTION IS FOR ALL PUSCH DFTS (i.e. radix 2^a * 3^b * 4^c * 5^d)
/// They use twiddles for 4-way parallel DFTS (i.e. 4 DFTS with interleaved input/output)
static int16_t W1_12s[8]__attribute__((aligned(32))) = {28377,-16383,28377,-16383,28377,-16383,28377,-16383};
static int16_t W2_12s[8]__attribute__((aligned(32))) = {16383,-28377,16383,-28377,16383,-28377,16383,-28377};
static int16_t W3_12s[8]__attribute__((aligned(32))) = {0,-32767,0,-32767,0,-32767,0,-32767};
static int16_t W4_12s[8]__attribute__((aligned(32))) = {-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377};
static int16_t W6_12s[8]__attribute__((aligned(32))) = {-32767,0,-32767,0,-32767,0,-32767,0};
static int16_t const W1_12s[8] __attribute__((aligned(32))) = {28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383};
static int16_t const W2_12s[8] __attribute__((aligned(32))) = {16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377};
static int16_t const W3_12s[8] __attribute__((aligned(32))) = {0, -32767, 0, -32767, 0, -32767, 0, -32767};
static int16_t const W4_12s[8] __attribute__((aligned(32))) = {-16383, -28377, -16383, -28377, -16383, -28377, -16383, -28377};
static int16_t const W6_12s[8] __attribute__((aligned(32))) = {-32767, 0, -32767, 0, -32767, 0, -32767, 0};
simd_q15_t *W1_12=(simd_q15_t *)W1_12s;
simd_q15_t *W2_12=(simd_q15_t *)W2_12s;
@@ -5587,11 +5587,30 @@ void dft12(int16_t *x,int16_t *y ,unsigned char scale_flag)
}
static int16_t W1_12s_256[16]__attribute__((aligned(32))) = {28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383};
static int16_t W2_12s_256[16]__attribute__((aligned(32))) = {16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377};
static int16_t W3_12s_256[16]__attribute__((aligned(32))) = {0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767};
static int16_t W4_12s_256[16]__attribute__((aligned(32))) = {-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377};
static int16_t W6_12s_256[16]__attribute__((aligned(32))) = {-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0};
static const int16_t W1_12s_256[16] __attribute__((aligned(32))) =
{28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383};
static const int16_t W2_12s_256[16] __attribute__((aligned(32))) =
{16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377};
static const int16_t W3_12s_256[16]
__attribute__((aligned(32))) = {0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767};
static const int16_t W4_12s_256[16] __attribute__((aligned(32))) = {-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377};
static const int16_t W6_12s_256[16]
__attribute__((aligned(32))) = {-32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0};
simd256_q15_t *W1_12_256=(simd256_q15_t *)W1_12s_256;
simd256_q15_t *W2_12_256=(simd256_q15_t *)W2_12s_256;
+2 -6
View File
@@ -655,17 +655,13 @@ typedef enum idft_size_idx {
struct {
adftfunc_t func;
int size;
} dft_ftab[]= {
FOREACH_DFTSZ(SZ_PTR)
};
} const dft_ftab[] = {FOREACH_DFTSZ(SZ_PTR)};
#define SZ_iPTR(Sz) {idft ## Sz,Sz},
struct {
adftfunc_t func;
int size;
} idft_ftab[]= {
FOREACH_IDFTSZ(SZ_iPTR)
};
} const idft_ftab[] = {FOREACH_IDFTSZ(SZ_iPTR)};
#endif
+2 -22
View File
@@ -37,14 +37,6 @@
#include <stdbool.h>
#include "types.h"
#ifdef DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#define EXTERN
#define INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#endif
#ifdef PHY_DBG_DEV_TST
#define PHY_DBG_DEV_TST_PRINTF(...) printf(__VA_ARGS__)
#else
@@ -60,12 +52,7 @@
/* TS 38.211 Table 4.3.2-1: Number of OFDM symbols per slot, slots per frame, and slots per subframe for normal cyclic prefix */
#define MU_NUMBER (5)
EXTERN const uint8_t N_slot_subframe[MU_NUMBER]
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
= { 1, 2, 4, 8, 16}
#endif
;
static const uint8_t N_slot_subframe[MU_NUMBER] = {1, 2, 4, 8, 16};
#define NB_DL_DATA_TO_UL_ACK (8) /* size of table TS 38.213 Table 9.2.3-1 */
@@ -173,11 +160,7 @@ typedef struct TDD_UL_DL_SlotConfig_s {
*
************************************************************************/
EXTERN const int16_t SRS_antenna_port[MAX_NROFSRS_PORTS]
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
= { 1000, 1001, 1002, 1003 }
#endif
;
static const int16_t SRS_antenna_port[MAX_NROFSRS_PORTS] = {1000, 1001, 1002, 1003};
typedef enum {
port1 = 1,
@@ -582,7 +565,4 @@ typedef struct {
SchedulingRequestResourceConfig_t *sr_ResourceConfig[MAX_NR_OF_SR_CONFIG_PER_CELL_GROUP];
} scheduling_request_config_t;
#undef EXTERN
#undef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#endif /* PHY_IMPL_DEFS_NR_H */
+2 -5
View File
@@ -270,13 +270,10 @@
/* FFS_NR_TODO it defines ue capability which is the number of slots */
/* - between reception of pdsch and tarnsmission of its acknowlegment */
/* - between reception of un uplink grant and its related transmission */
// should be 2 as per NR standard, but current UE is not able to perform this value
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (3)
#ifndef NO_RAT_NR
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX) /* for NR this will certainly depends to such UE capability which is not yet defined */
#else
#define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
#endif
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX)
#define NR_MAX_ULSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 6.1 UE procedure for receiving the physical uplink shared channel */
#define NR_MAX_DLSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 5.1 UE procedure for receiving the physical downlink shared channel */
+1 -1
View File
@@ -177,7 +177,7 @@ static const uint16_t beta_ack[16] = {16, // 2.000
400, // 50.000
640, // 80.000
808}; // 126.00
// TS 36.211 5.3 scrambling
static const int8_t delta_PUSCH_abs[4] = {-4, -1, 1, 4};
static const int8_t delta_PUSCH_acc[4] = {-1, 0, 1, 3};
@@ -47,8 +47,6 @@
//#define DEBUG_RXDATA
//#define SRS_IND_DEBUG
uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,254,32,34,36,38,40,42,44,46,254,254,48,50,52,54,56,58,60,62};
extern uint8_t nfapi_mode;
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu) {
+2 -2
View File
@@ -44,8 +44,8 @@
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
const char *dl_pdu_type[]={"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH", "CSI_RS", "CSI_IM", "TA"};
const char *ul_pdu_type[]={"PRACH", "PUCCH", "PUSCH", "SRS"};
const char *const dl_pdu_type[] = {"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH", "CSI_RS", "CSI_IM", "TA"};
const char *const ul_pdu_type[] = {"PRACH", "PUCCH", "PUSCH", "SRS"};
queue_t nr_rx_ind_queue;
queue_t nr_crc_ind_queue;
queue_t nr_uci_ind_queue;
+3 -1
View File
@@ -74,7 +74,9 @@ fifo_dump_emos_UE emos_dump_UE;
#include "intertask_interface.h"
#include "T.h"
unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162};
static const unsigned int gain_table[31] = {100, 112, 126, 141, 158, 178, 200, 224, 251, 282, 316,
359, 398, 447, 501, 562, 631, 708, 794, 891, 1000, 1122,
1258, 1412, 1585, 1778, 1995, 2239, 2512, 2818, 3162};
void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind,
-8
View File
@@ -41,18 +41,10 @@
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <openair1/PHY/impl_defs_nr.h>
#include <common/utils/nr/nr_common.h>
#ifndef NO_RAT_NR
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR_UE/harq_nr.h"
#define DEFINE_VARIABLES_PUCCH_UE_NR_H
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
#undef DEFINE_VARIABLES_PUCCH_UE_NR_H
#endif
long
binary_search_float_nr(
-8
View File
@@ -42,14 +42,6 @@
#include "PHY/defs_nr_UE.h"
#ifdef DEFINE_VARIABLES_PUCCH_UE_NR_H
#define EXTERN
#define INIT_VARIABLES_PUCCH_UE_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_PUCCH_UE_NR_H
#endif
/************** DEFINE ********************************************/
#define BITS_PER_SYMBOL_BPSK (1) /* 1 bit per symbol for bpsk modulation */
+3 -7
View File
@@ -2586,13 +2586,9 @@ int ue_pdcch_procedures(uint8_t eNB_id,
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
ue->pdcch_vars[0%RX_NB_TH][eNB_id]->crnti_is_temporary? ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti: 0)==0)) {
// update TPC for PUCCH
if((dci_alloc_rx[i].format == format1) ||
(dci_alloc_rx[i].format == format1A) ||
(dci_alloc_rx[i].format == format1B) ||
(dci_alloc_rx[i].format == format2) ||
(dci_alloc_rx[i].format == format2A) ||
(dci_alloc_rx[i].format == format2B)) {
//ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->g_pucch += ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->delta_PUCCH;
if ((dci_alloc_rx[i].format == format1) || (dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1B)
|| (dci_alloc_rx[i].format == format2) || (dci_alloc_rx[i].format == format2A)
|| (dci_alloc_rx[i].format == format2B)) {
int32_t delta_pucch = ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->delta_PUCCH;
for(int th_id=0; th_id<RX_NB_TH; th_id++) {
+33 -21
View File
@@ -19,29 +19,41 @@
* contact@openairinterface.org
*/
static double R22_sqrt[6][32] = {
{0.921700, -0.000000, 0.010380, -0.027448, -0.250153, 0.294754, 0.005961, 0.010769, 0.010380, 0.027448, 0.921700, 0.000000, -0.011595, -0.004130, -0.250153, 0.294754, -0.250153, -0.294754, -0.011595, 0.004130, 0.921700, 0.000000, 0.010380, -0.027448, 0.005961, -0.010769, -0.250153, -0.294754, 0.010380, 0.027448, 0.921700, 0.000000},
{0.923810, 0.000000, 0.004069, 0.027832, 0.151730, 0.350180, -0.009882, 0.006114, 0.004069, -0.027832, 0.923810, 0.000000, 0.011218, -0.003029, 0.151730, 0.350180, 0.151730, -0.350180, 0.011218, 0.003029, 0.923810, -0.000000, 0.004069, 0.027832, -0.009882, -0.006114, 0.151730, -0.350180, 0.004069, -0.027832, 0.923810, 0.000000},
{0.927613, 0.000000, 0.014253, 0.025767, -0.061171, -0.367133, 0.009258, -0.007340, 0.014253, -0.025767, 0.927613, -0.000000, -0.011138, -0.003942, -0.061171, -0.367133, -0.061171, 0.367133, -0.011138, 0.003942, 0.927613, 0.000000, 0.014253, 0.025767, 0.009258, 0.007340, -0.061171, 0.367133, 0.014253, -0.025767, 0.927613, 0.000000},
{0.869794, -0.000000, -0.010613, -0.001218, 0.399115, 0.289852, -0.004464, -0.004096, -0.010613, 0.001218, 0.869794, -0.000000, -0.005276, -0.002978, 0.399115, 0.289852, 0.399115, -0.289852, -0.005276, 0.002978, 0.869794, -0.000000, -0.010613, -0.001218, -0.004464, 0.004096, 0.399115, -0.289852, -0.010613, 0.001218, 0.869794, 0.000000},
{0.919726, -0.000000, 0.038700, -0.111146, 0.217804, 0.300925, 0.045531, -0.013659, 0.038700, 0.111146, 0.919726, 0.000000, -0.027201, 0.038983, 0.217804, 0.300925, 0.217804, -0.300925, -0.027201, -0.038983, 0.919726, 0.000000, 0.038700, -0.111146, 0.045531, 0.013659, 0.217804, -0.300925, 0.038700, 0.111146, 0.919726, 0.000000},
{0.867608, -0.000000, 0.194097, -0.112414, -0.418811, 0.095938, -0.081264, 0.075727, 0.194097, 0.112414, 0.867608, -0.000000, -0.106125, -0.032801, -0.418811, 0.095938, -0.418811, -0.095938, -0.106125, 0.032801, 0.867608, 0.000000, 0.194097, -0.112414, -0.081264, -0.075727, -0.418811, -0.095938, 0.194097, 0.112414, 0.867608, 0.000000},
static const double R22_sqrt[6][32] = {
{0.921700, -0.000000, 0.010380, -0.027448, -0.250153, 0.294754, 0.005961, 0.010769, 0.010380, 0.027448, 0.921700,
0.000000, -0.011595, -0.004130, -0.250153, 0.294754, -0.250153, -0.294754, -0.011595, 0.004130, 0.921700, 0.000000,
0.010380, -0.027448, 0.005961, -0.010769, -0.250153, -0.294754, 0.010380, 0.027448, 0.921700, 0.000000},
{0.923810, 0.000000, 0.004069, 0.027832, 0.151730, 0.350180, -0.009882, 0.006114, 0.004069, -0.027832, 0.923810,
0.000000, 0.011218, -0.003029, 0.151730, 0.350180, 0.151730, -0.350180, 0.011218, 0.003029, 0.923810, -0.000000,
0.004069, 0.027832, -0.009882, -0.006114, 0.151730, -0.350180, 0.004069, -0.027832, 0.923810, 0.000000},
{0.927613, 0.000000, 0.014253, 0.025767, -0.061171, -0.367133, 0.009258, -0.007340, 0.014253, -0.025767, 0.927613,
-0.000000, -0.011138, -0.003942, -0.061171, -0.367133, -0.061171, 0.367133, -0.011138, 0.003942, 0.927613, 0.000000,
0.014253, 0.025767, 0.009258, 0.007340, -0.061171, 0.367133, 0.014253, -0.025767, 0.927613, 0.000000},
{0.869794, -0.000000, -0.010613, -0.001218, 0.399115, 0.289852, -0.004464, -0.004096, -0.010613, 0.001218, 0.869794,
-0.000000, -0.005276, -0.002978, 0.399115, 0.289852, 0.399115, -0.289852, -0.005276, 0.002978, 0.869794, -0.000000,
-0.010613, -0.001218, -0.004464, 0.004096, 0.399115, -0.289852, -0.010613, 0.001218, 0.869794, 0.000000},
{0.919726, -0.000000, 0.038700, -0.111146, 0.217804, 0.300925, 0.045531, -0.013659, 0.038700, 0.111146, 0.919726,
0.000000, -0.027201, 0.038983, 0.217804, 0.300925, 0.217804, -0.300925, -0.027201, -0.038983, 0.919726, 0.000000,
0.038700, -0.111146, 0.045531, 0.013659, 0.217804, -0.300925, 0.038700, 0.111146, 0.919726, 0.000000},
{0.867608, -0.000000, 0.194097, -0.112414, -0.418811, 0.095938, -0.081264, 0.075727, 0.194097, 0.112414, 0.867608,
-0.000000, -0.106125, -0.032801, -0.418811, 0.095938, -0.418811, -0.095938, -0.106125, 0.032801, 0.867608, 0.000000,
0.194097, -0.112414, -0.081264, -0.075727, -0.418811, -0.095938, 0.194097, 0.112414, 0.867608, 0.000000},
};
static double R21_sqrt[6][8] = {
{0.922167, 0.000000,-0.250280, 0.294903,-0.250280, -0.294903,0.922167, 0.000000},
{0.924238, 0.000000,0.151801, 0.350342,0.151801, -0.350342,0.924238, 0.000000},
{0.928080, 0.000000,-0.061202, -0.367318,-0.061202, 0.367318,0.928080, 0.000000},
{0.869860, 0.000000,0.399145, 0.289874,0.399145, -0.289874,0.869860, 0.000000},
{0.927225, 0.000000,0.219580, 0.303378,0.219580, -0.303378,0.927225, 0.000000},
{0.896133, 0.000000,-0.432581, 0.099092,-0.432581, -0.099092,0.896133, 0.000000},
static const double R21_sqrt[6][8] = {
{0.922167, 0.000000, -0.250280, 0.294903, -0.250280, -0.294903, 0.922167, 0.000000},
{0.924238, 0.000000, 0.151801, 0.350342, 0.151801, -0.350342, 0.924238, 0.000000},
{0.928080, 0.000000, -0.061202, -0.367318, -0.061202, 0.367318, 0.928080, 0.000000},
{0.869860, 0.000000, 0.399145, 0.289874, 0.399145, -0.289874, 0.869860, 0.000000},
{0.927225, 0.000000, 0.219580, 0.303378, 0.219580, -0.303378, 0.927225, 0.000000},
{0.896133, 0.000000, -0.432581, 0.099092, -0.432581, -0.099092, 0.896133, 0.000000},
};
static double R12_sqrt[6][8] = {
{0.999494, 0.000000,0.011256, -0.029765,0.011256, 0.029765,0.999494, 0.000000},
{0.999537, 0.000000,0.004402, 0.030114,0.004402, -0.030114,0.999537, 0.000000},
{0.999497, 0.000000,0.015358, 0.027764,0.015358, -0.027764,0.999497, 0.000000},
{0.999925, -0.000000,-0.012201, -0.001400,-0.012201, 0.001400,0.999925, 0.000000},
{0.991912, 0.000000,0.041738, -0.119870,0.041738, 0.119870,0.991912, 0.000000},
{0.968169, 0.000000,0.216594, -0.125443,0.216594, 0.125443,0.968169, 0.000000},
static const double R12_sqrt[6][8] = {
{0.999494, 0.000000, 0.011256, -0.029765, 0.011256, 0.029765, 0.999494, 0.000000},
{0.999537, 0.000000, 0.004402, 0.030114, 0.004402, -0.030114, 0.999537, 0.000000},
{0.999497, 0.000000, 0.015358, 0.027764, 0.015358, -0.027764, 0.999497, 0.000000},
{0.999925, -0.000000, -0.012201, -0.001400, -0.012201, 0.001400, 0.999925, 0.000000},
{0.991912, 0.000000, 0.041738, -0.119870, 0.041738, 0.119870, 0.991912, 0.000000},
{0.968169, 0.000000, 0.216594, -0.125443, 0.216594, 0.125443, 0.968169, 0.000000},
};
// TS 38.104 - Table G.2.3.1.2-2: MIMO correlation matrices for high correlation
+19 -16
View File
@@ -36,25 +36,28 @@
#define E1AP_NUM_MSG_HANDLERS 14
typedef int (*e1ap_message_processing_t)(e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *message_p);
e1ap_message_processing_t e1ap_message_processing[E1AP_NUM_MSG_HANDLERS][3] = {
const e1ap_message_processing_t e1ap_message_processing[E1AP_NUM_MSG_HANDLERS][3] = {
{ 0, 0, 0 }, /* Reset */
{ 0, 0, 0 }, /* ErrorIndication */
{ 0, 0, 0 }, /* privateMessage */
{ e1apCUCP_handle_SETUP_REQUEST, e1apCUUP_handle_SETUP_RESPONSE, e1apCUUP_handle_SETUP_FAILURE }, /* gNBCUUPE1Setup */
{ 0, 0, 0 }, /* gNBCUCPE1Setup */
{ 0, 0, 0 }, /* gNBCUUPConfigurationUpdate */
{ 0, 0, 0 }, /* gNBCUCPConfigurationUpdate */
{ 0, 0, 0 }, /* E1Release */
{ e1apCUUP_handle_BEARER_CONTEXT_SETUP_REQUEST, e1apCUCP_handle_BEARER_CONTEXT_SETUP_RESPONSE, e1apCUCP_handle_BEARER_CONTEXT_SETUP_FAILURE }, /* bearerContextSetup */
{ e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST, 0, 0 }, /* bearerContextModification */
{ 0, 0, 0 }, /* bearerContextModificationRequired */
{ e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND, e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE, 0 }, /* bearerContextRelease */
{ 0, 0, 0 }, /* bearerContextReleaseRequired */
{ 0, 0, 0 } /* bearerContextInactivityNotification */
{0, 0, 0}, /* Reset */
{0, 0, 0}, /* ErrorIndication */
{0, 0, 0}, /* privateMessage */
{e1apCUCP_handle_SETUP_REQUEST, e1apCUUP_handle_SETUP_RESPONSE, e1apCUUP_handle_SETUP_FAILURE}, /* gNBCUUPE1Setup */
{0, 0, 0}, /* gNBCUCPE1Setup */
{0, 0, 0}, /* gNBCUUPConfigurationUpdate */
{0, 0, 0}, /* gNBCUCPConfigurationUpdate */
{0, 0, 0}, /* E1Release */
{e1apCUUP_handle_BEARER_CONTEXT_SETUP_REQUEST,
e1apCUCP_handle_BEARER_CONTEXT_SETUP_RESPONSE,
e1apCUCP_handle_BEARER_CONTEXT_SETUP_FAILURE}, /* bearerContextSetup */
{e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST, 0, 0}, /* bearerContextModification */
{0, 0, 0}, /* bearerContextModificationRequired */
{e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND, e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE, 0}, /* bearerContextRelease */
{0, 0, 0}, /* bearerContextReleaseRequired */
{0, 0, 0} /* bearerContextInactivityNotification */
};
const char *e1ap_direction2String(int e1ap_dir) {
const char *const e1ap_direction2String(int e1ap_dir)
{
static const char *e1ap_direction_String[] = {
"", /* Nothing */
"Initiating message", /* initiating message */
+5 -5
View File
@@ -71,11 +71,11 @@ static const f1ap_message_processing_t f1ap_messages_processing[][3] = {
};
const char *f1ap_direction2String(int f1ap_dir) {
static const char *f1ap_direction_String[] = {
"", /* Nothing */
"Initiating message", /* initiating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
static const char *const f1ap_direction_String[] = {
"", /* Nothing */
"Initiating message", /* initiating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
};
return(f1ap_direction_String[f1ap_dir]);
}
+2 -2
View File
@@ -225,7 +225,7 @@ int32_t get_uldl_offset(int eutra_bandP) {
return (eutra_bandtable[i].dl_min - eutra_bandtable[i].ul_min);
}
uint32_t bw_table[6] = {6*180,15*180,25*180,50*180,75*180,100*180};
const int32_t bw_table[6] = {6 * 180, 15 * 180, 25 * 180, 50 * 180, 75 * 180, 100 * 180};
void config_mib(int Mod_idP,
int CC_idP,
@@ -333,7 +333,7 @@ void config_sib1(int Mod_idP, int CC_idP, LTE_TDD_Config_t *tdd_ConfigP) {
}
}
int power_off_dB[6] = { 78, 118, 140, 170, 188, 200 };
const int power_off_dB[6] = {78, 118, 140, 170, 188, 200};
void
config_sib2(int Mod_idP,
+16 -1
View File
@@ -1353,7 +1353,22 @@ initiate_ra_proc(module_id_t module_idP,
do {
if (IS_SOFTMODEM_IQPLAYER) { /* iq player mode, use deterministic rnti */
static int drnti[MAX_MOBILES_PER_ENB];
static int drnti_def[]={ 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 };
static const int drnti_def[] = {0xbda7,
0x71da,
0x9c40,
0xc350,
0x2710,
0x4e20,
0x7530,
0x1388,
0x3a98,
0x61a8,
0x88b8,
0xafc8,
0xd6d8,
0x1b58,
0x4268,
0x6978};
for (int j=0; j<MAX_MOBILES_PER_ENB && j< (sizeof(drnti_def)/sizeof(int));j++)
drnti[i]=drnti_def[i];
@@ -1449,15 +1449,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
}
//------------------------------------------------------------------------------
uint8_t
Np[6][4] = {
{0, 1, 3, 5},
{0, 3, 8, 13},
{0, 5, 13, 22},
{0, 11, 27, 44},
{0, 16, 41, 66},
{0, 22, 55, 88}
};
const uint8_t Np[6][4] = {{0, 1, 3, 5}, {0, 3, 8, 13}, {0, 5, 13, 22}, {0, 11, 27, 44}, {0, 16, 41, 66}, {0, 22, 55, 88}};
//------------------------------------------------------------------------------
// This is part of the PUCCH allocation procedure (see Section 10.1 36.213)
+8 -8
View File
@@ -69,14 +69,14 @@ extern int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req);
// This table holds the allowable PRB sizes for ULSCH transmissions
uint8_t rb_table[34] = {
1, 2, 3, 4, 5, // 0-4
6, 8, 9, 10, 12, // 5-9
15, 16, 18, 20, 24, // 10-14
25, 27, 30, 32, 36, // 15-19
40, 45, 48, 50, 54, // 20-24
60, 64, 72, 75, 80, // 25-29
81, 90, 96, 100 // 30-33
const uint8_t rb_table[34] = {
1, 2, 3, 4, 5, // 0-4
6, 8, 9, 10, 12, // 5-9
15, 16, 18, 20, 24, // 10-14
25, 27, 30, 32, 36, // 15-19
40, 45, 48, 50, 54, // 20-24
60, 64, 72, 75, 80, // 25-29
81, 90, 96, 100 // 30-33
};
// This table hold the possible number of MTC repetition for CE ModeA
+1 -1
View File
@@ -42,7 +42,7 @@ extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES
extern int NB_UE_INST;
extern const int cqi_to_mcs[16];
extern uint8_t rb_table[34];
extern const uint8_t rb_table[34];
extern rb_id_t mbms_rab_id;
@@ -2899,7 +2899,7 @@ uint8_t compute_srs_resource_indicator(NR_PUSCH_ServingCellConfig_t *pusch_servi
}
if (count>0) {
nbits = ceil(log2(count));
if (val && srs_feedback && nbits > 0) {
if (val && srs_feedback && count > 1) {
*val = table_7_3_1_1_2_32[count-2][srs_feedback->sri];
}
}
@@ -3633,7 +3633,7 @@ int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig, long transformPrec
}
}
int tdd_period_to_num[8] = {500,625,1000,1250,2000,2500,5000,10000};
static const int tdd_period_to_num[8] = {500, 625, 1000, 1250, 2000, 2500, 5000, 10000};
bool is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, slot_t slot)
{
+2 -2
View File
@@ -80,5 +80,5 @@ extern void mac_rlc_data_ind(const module_id_t module_idP,
num_tb_t num_tbP,
crc_t *crcs_pP);
extern const char *rnti_types[];
extern const char *dci_formats[];
extern const char *const rnti_types[];
extern const char *const dci_formats[];
+3 -2
View File
@@ -32,8 +32,9 @@
#include <stdint.h>
const char *rnti_types[]={"RNTI_new", "RNTI_C", "RNTI_RA", "NR_RNTI_P", "NR_RNTI_CS", "NR_RNTI_TC", "NR_RNTI_SP_CSI", "NR_RNTI_SI"};
const char *dci_formats[]={"1_0", "1_1", "2_0", "2_1", "2_2", "2_3", "0_0", "0_1"};
const char* const rnti_types[] =
{"RNTI_new", "RNTI_C", "RNTI_RA", "NR_RNTI_P", "NR_RNTI_CS", "NR_RNTI_TC", "NR_RNTI_SP_CSI", "NR_RNTI_SI"};
const char* const dci_formats[] = {"1_0", "1_1", "2_0", "2_1", "2_2", "2_3", "0_0", "0_1"};
// table_7_3_1_1_2_2_3_4_5 contains values for number of layers and precoding information for tables 7.3.1.1.2-2/3/4/5 from TS 38.212 subclause 7.3.1.1.2
// the first 6 columns contain table 7.3.1.1.2-2: Precoding information and number of layers, for 4 antenna ports, if transformPrecoder=disabled and maxRank = 2 or 3 or 4
+1 -1
View File
@@ -81,7 +81,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) {
nr_pdcp_layer_init();
nr_pdcp_add_drbs(ENB_FLAG_NO, nr_ue_mac_inst->crnti, rbconfig->drb_ToAddModList, 0, NULL, NULL, &rlc_bearer_list);
nr_rlc_add_drb(nr_ue_mac_inst->crnti, rbconfig->drb_ToAddModList->list.array[0]->drb_Identity, rlc_rbconfig);
nr_ue_mac_inst->logicalChannelBearer_exist[0] = true;
nr_ue_mac_inst->logicalChannelBearer_exist[4] = true;
// free memory
free_nr_noS1_bearer_config(&rbconfig, &rlc_rbconfig);
+2 -2
View File
@@ -300,11 +300,11 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
if(ack_nack) {
LOG_D(NR_MAC, "Decoding NR-BCCH-DL-SCH-Message (SIB1 or SI)\n");
nr_mac_rrc_data_ind_ue(module_id, cc_id, gNB_index, 0, 0, 0, NR_BCCH_DL_SCH, (uint8_t *) pduP, pdu_len);
mac->get_sib1 = false;
mac->get_otherSI = false;
}
else
LOG_E(NR_MAC, "Got NACK on NR-BCCH-DL-SCH-Message (%s)\n", mac->get_sib1 ? "SIB1" : "other SI");
mac->get_sib1 = false;
mac->get_otherSI = false;
return 0;
}
@@ -614,7 +614,7 @@ static void pf_dl(module_id_t module_id,
/* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */
sched_pdsch->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
/* Calculate Throughput */
const float a = 0.0005f; // corresponds to 200ms window
const float a = 0.01f;
const uint32_t b = UE->mac_stats.dl.current_bytes;
UE->dl_thr_ue = (1 - a) * UE->dl_thr_ue + a * b;
@@ -1646,7 +1646,7 @@ static void pf_ul(module_id_t module_id,
const NR_mac_dir_stats_t *stats = &UE->mac_stats.ul;
/* Calculate throughput */
const float a = 0.0005f; // corresponds to 200ms window
const float a = 0.01f;
const uint32_t b = stats->current_bytes;
UE->ul_thr_ue = (1 - a) * UE->ul_thr_ue + a * b;
+30 -24
View File
@@ -1759,7 +1759,7 @@ static void check_t_poll_retransmit(nr_rlc_entity_am_t *entity)
if (!check_poll_after_pdu_assembly(entity))
return;
/* retransmit the head of wait list, this is the case
/* retransmit the SDU at the head of wait list, this is the case
* "consider any RLC SDU which has not been positively acknowledged for
* retransmission" of 36.322 5.3.3.4.
* We don't search for the highest SN, it's simpler to just take the head
@@ -1771,39 +1771,45 @@ static void check_t_poll_retransmit(nr_rlc_entity_am_t *entity)
* It seems that no, the wait list should not be empty here, but not sure.
*/
entity->wait_list = cur->next;
if (entity->wait_list == NULL)
entity->wait_end = NULL;
/* 38.322 says "SDU", not "SDU segment", but let's retransmit only
* the 'cur' SDU segment. To be changed if needed. (Maybe we have
* to retransmit all SDU segments with the same SN that are in the
* wait list.)
*/
/* increase retx count. Don't care about segmentation, so maybe we
* increase too much.
*/
cur->sdu->retx_count++;
int sdu_retx_count = cur->sdu->retx_count;
int retransmit_sn = cur->sdu->sn;
/* 38.322 says "SDU", not "SDU segment", so let's retransmit all
* SDU segments with the retransmit SN in the wait list.
*/
do {
entity->wait_list = cur->next;
if (entity->wait_list == NULL)
entity->wait_end = NULL;
/* update buffer status */
entity->common.bstatus.retx_size += compute_pdu_header_size(entity, cur)
+ cur->size;
LOG_D(RLC, "put sn %d so %d size %d in retx list (retx_count %d)\n",
cur->sdu->sn, cur->so, cur->size, cur->sdu->retx_count);
/* put in retransmit list */
entity->retransmit_list = nr_rlc_sdu_segment_list_add(sn_compare_tx, entity,
entity->retransmit_list, cur);
cur = entity->wait_list;
} while (cur != NULL && cur->sdu->sn == retransmit_sn);
/* report max RETX reached for all retx_count >= max_retx_threshold
* (specs say to report if retx_count == max_retx_threshold).
* Upper layers should react (radio link failure), so no big deal.
* We deal with segmentation by requiring
* retx_count >= max_retx_threshold * number of segments.
* We may report max RETX reached too late/early. To be refined if
* this is a problem.
* Because of segmentation, we may report too early/too late, not
* very clear. To refine if needed.
*/
if (cur->sdu->retx_count
>= entity->max_retx_threshold * cur->sdu->ref_count)
if (sdu_retx_count >= entity->max_retx_threshold)
entity->common.max_retx_reached(entity->common.max_retx_reached_data,
(nr_rlc_entity_t *)entity);
/* update buffer status */
entity->common.bstatus.retx_size += compute_pdu_header_size(entity, cur)
+ cur->size;
/* put in retransmit list */
entity->retransmit_list = nr_rlc_sdu_segment_list_add(sn_compare_tx, entity,
entity->retransmit_list, cur);
}
static void check_t_reassembly(nr_rlc_entity_am_t *entity)
+133 -186
View File
@@ -54,23 +54,33 @@ static uint64_t nr_rlc_current_time;
static int nr_rlc_current_time_last_frame;
static int nr_rlc_current_time_last_subframe;
void mac_rlc_data_ind (
const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
char *buffer_pP,
const tb_size_t tb_sizeP,
num_tb_t num_tbP,
crc_t *crcs_pP)
nr_rlc_entity_t *get_rlc_entity_from_lcid(nr_rlc_ue_t *ue,
logical_chan_id_t channel_id)
{
nr_rlc_ue_t *ue;
nr_rlc_entity_t *rb;
if (channel_id == 0)
return ue->srb0;
nr_rlc_rb_t *rb = &ue->lcid2rb[channel_id - 1];
if (rb->type == NR_RLC_SRB)
return ue->srb[rb->choice.srb_id - 1];
else {
AssertFatal(rb->type == NR_RLC_DRB,
"Invalid RB type\n");
return ue->drb[rb->choice.drb_id - 1];
}
}
void mac_rlc_data_ind(const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t rameP,
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
char *buffer_pP,
const tb_size_t tb_sizeP,
num_tb_t num_tbP,
crc_t *crcs_pP)
{
if (module_idP != 0 || eNB_index != 0 || /*enb_flagP != 1 ||*/ MBMS_flagP != 0) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
@@ -81,20 +91,15 @@ void mac_rlc_data_ind (
T_INT(channel_idP), T_INT(tb_sizeP));
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
if(ue == NULL)
LOG_I(RLC, "RLC instance for the given UE was not found \n");
LOG_I(RLC, "RLC instance for the given UE was not found \n");
switch (channel_idP) {
case 0: rb = ue->srb0; break;
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... 32: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, channel_idP);
if (rb != NULL) {
LOG_D(RLC, "RB found! (channel ID %d) \n", channel_idP);
LOG_D(RLC, "RB found! (channel ID %d) \n", channel_idP);
rb->set_time(rb, nr_rlc_current_time);
rb->recv_pdu(rb, buffer_pP, tb_sizeP);
} else {
@@ -106,37 +111,24 @@ void mac_rlc_data_ind (
nr_rlc_manager_unlock(nr_rlc_ue_manager);
}
tbs_size_t mac_rlc_data_req(
const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
char *buffer_pP,
const uint32_t sourceL2Id,
const uint32_t destinationL2Id
)
tbs_size_t mac_rlc_data_req(const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
char *buffer_pP,
const uint32_t sourceL2Id,
const uint32_t destinationL2Id)
{
int ret;
nr_rlc_ue_t *ue;
nr_rlc_entity_t *rb;
int maxsize;
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) {
case 0: rb = ue->srb0; break;
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... 32: rb = ue->drb[channel_idP - 4]; break;
default:
rb = NULL;
LOG_E(RLC, "In %s:%d:%s: data request for unknown RB with LCID 0x%02x !\n", __FILE__, __LINE__, __FUNCTION__, channel_idP);
break;
}
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, channel_idP);
if (rb != NULL) {
LOG_D(RLC, "MAC PDU to get created for channel_idP:%d \n", channel_idP);
@@ -157,32 +149,22 @@ tbs_size_t mac_rlc_data_req(
return ret;
}
mac_rlc_status_resp_t mac_rlc_status_ind(
const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const sub_frame_t subframeP,
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const uint32_t sourceL2Id,
const uint32_t destinationL2Id
)
mac_rlc_status_resp_t mac_rlc_status_ind(const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const sub_frame_t subframeP,
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const uint32_t sourceL2Id,
const uint32_t destinationL2Id)
{
nr_rlc_ue_t *ue;
mac_rlc_status_resp_t ret;
nr_rlc_entity_t *rb;
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) {
case 0: rb = ue->srb0; break;
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, channel_idP);
if (rb != NULL) {
nr_rlc_entity_buffer_status_t buf_stat;
@@ -212,18 +194,15 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
return ret;
}
rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const sub_frame_t subframeP,
const eNB_flag_t enb_flagP,
const logical_chan_id_t channel_idP)
rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module_idP,
const rnti_t rntiP,
const eNB_index_t eNB_index,
const frame_t frameP,
const sub_frame_t subframeP,
const eNB_flag_t enb_flagP,
const logical_chan_id_t channel_idP)
{
nr_rlc_ue_t *ue;
rlc_buffer_occupancy_t ret;
nr_rlc_entity_t *rb;
if (enb_flagP) {
LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
@@ -239,13 +218,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
}
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) {
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, channel_idP);
if (rb != NULL) {
nr_rlc_entity_buffer_status_t buf_stat;
@@ -272,17 +246,16 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
}
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_sizeP,
mem_block_t *sdu_pP,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id
)
rlc_op_status_t rlc_data_req(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP,
const mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_sizeP,
mem_block_t *sdu_pP,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id)
{
int rnti = ctxt_pP->rntiMaybeUEid;
nr_rlc_ue_t *ue;
@@ -322,22 +295,14 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
return RLC_OP_STATUS_OK;
}
int nr_rlc_get_available_tx_space(
const rnti_t rntiP,
const logical_chan_id_t channel_idP)
int nr_rlc_get_available_tx_space(const rnti_t rntiP,
const logical_chan_id_t channel_idP)
{
nr_rlc_ue_t *ue;
nr_rlc_entity_t *rb;
int ret;
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
switch (channel_idP) {
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
case 4 ... MAX_DRBS_PER_UE: rb = ue->drb[channel_idP - 4]; break;
default: rb = NULL; break;
}
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
nr_rlc_entity_t *rb = get_rlc_entity_from_lcid(ue, channel_idP);
if (rb != NULL) {
ret = rb->available_tx_space(rb);
@@ -617,12 +582,8 @@ rb_found:
void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig)
{
nr_rlc_entity_t *nr_rlc_am;
nr_rlc_ue_t *ue;
struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config;
struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig;
int channel_id = rlc_BearerConfig->logicalChannelIdentity;
int logical_channel_group;
int t_status_prohibit;
@@ -634,17 +595,8 @@ void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_Beare
int sn_field_length;
LOG_D(RLC,"Trying to add SRB %d\n",srb_id);
if (srb_id != 1 && srb_id != 2) {
LOG_E(RLC, "%s:%d:%s: fatal, bad srb id %d\n",
__FILE__, __LINE__, __FUNCTION__, srb_id);
exit(1);
}
if (channel_id != srb_id) {
LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n",
__FILE__, __LINE__, __FUNCTION__);
exit(1);
}
AssertFatal(srb_id > 0 && srb_id < 4,
"Invalid srb id %d\n", srb_id);
logical_channel_group = *l->ul_SpecificParameters->logicalChannelGroup;
@@ -677,9 +629,16 @@ void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_Beare
}
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
AssertFatal(rlc_BearerConfig->servedRadioBearer &&
(rlc_BearerConfig->servedRadioBearer->present ==
NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity),
"servedRadioBearer for SRB mandatory present when setting up an SRB RLC entity\n");
int local_id = rlc_BearerConfig->logicalChannelIdentity - 1; // LCID 0 for SRB 0 not mapped
ue->lcid2rb[local_id].type = NR_RLC_SRB;
ue->lcid2rb[local_id].choice.srb_id = rlc_BearerConfig->servedRadioBearer->choice.srb_Identity;
if (ue->srb[srb_id-1] != NULL) {
LOG_W(RLC, "%s:%d:%s: SRB %d already exists for UE with RNTI %04x, do nothing\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
LOG_E(RLC, "%s:%d:%s: SRB %d already exists for UE with RNTI %04x, do nothing\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
} else {
/* hack: hardcode values for NR */
t_poll_retransmit = 45;
@@ -689,15 +648,15 @@ void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_Beare
poll_byte = -1;
max_retx_threshold = 8;
sn_field_length = 12;
nr_rlc_am = new_nr_rlc_entity_am(RLC_RX_MAXSIZE,
RLC_TX_MAXSIZE,
deliver_sdu, ue,
successful_delivery, ue,
max_retx_reached, ue,
t_poll_retransmit,
t_reassembly, t_status_prohibit,
poll_pdu, poll_byte, max_retx_threshold,
sn_field_length);
nr_rlc_entity_t *nr_rlc_am = new_nr_rlc_entity_am(RLC_RX_MAXSIZE,
RLC_TX_MAXSIZE,
deliver_sdu, ue,
successful_delivery, ue,
max_retx_reached, ue,
t_poll_retransmit,
t_reassembly, t_status_prohibit,
poll_pdu, poll_byte, max_retx_threshold,
sn_field_length);
nr_rlc_ue_add_srb_rlc_entity(ue, srb_id, nr_rlc_am);
LOG_I(RLC, "%s:%d:%s: added srb %d to UE with RNTI 0x%x\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
@@ -707,12 +666,8 @@ void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_Beare
static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig)
{
nr_rlc_entity_t *nr_rlc_am;
nr_rlc_ue_t *ue;
struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config;
struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig;
int channel_id = rlc_BearerConfig->logicalChannelIdentity;
int logical_channel_group;
int t_status_prohibit;
@@ -723,17 +678,8 @@ static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
int t_reassembly;
int sn_field_length;
if (!(drb_id >= 1 && drb_id <= MAX_DRBS_PER_UE)) {
LOG_E(RLC, "%s:%d:%s: fatal, bad srb id %d\n",
__FILE__, __LINE__, __FUNCTION__, drb_id);
exit(1);
}
if (channel_id != drb_id + 3) {
LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n",
__FILE__, __LINE__, __FUNCTION__);
exit(1);
}
AssertFatal(drb_id > 0 && drb_id <= MAX_DRBS_PER_UE,
"Invalid DRB ID %d\n", drb_id);
logical_channel_group = *l->ul_SpecificParameters->logicalChannelGroup;
@@ -766,19 +712,26 @@ static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
}
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
AssertFatal(rlc_BearerConfig->servedRadioBearer &&
(rlc_BearerConfig->servedRadioBearer->present ==
NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity),
"servedRadioBearer for DRB mandatory present when setting up an SRB RLC entity\n");
int local_id = rlc_BearerConfig->logicalChannelIdentity - 1; // LCID 0 for SRB 0 not mapped
ue->lcid2rb[local_id].type = NR_RLC_DRB;
ue->lcid2rb[local_id].choice.drb_id = rlc_BearerConfig->servedRadioBearer->choice.drb_Identity;
if (ue->drb[drb_id-1] != NULL) {
LOG_W(RLC, "%s:%d:%s: DRB %d already exists for UE with RNTI %04x, do nothing\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
LOG_E(RLC, "%s:%d:%s: DRB %d already exists for UE with RNTI %04x, do nothing\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
} else {
nr_rlc_am = new_nr_rlc_entity_am(RLC_RX_MAXSIZE,
RLC_TX_MAXSIZE,
deliver_sdu, ue,
successful_delivery, ue,
max_retx_reached, ue,
t_poll_retransmit,
t_reassembly, t_status_prohibit,
poll_pdu, poll_byte, max_retx_threshold,
sn_field_length);
nr_rlc_entity_t *nr_rlc_am = new_nr_rlc_entity_am(RLC_RX_MAXSIZE,
RLC_TX_MAXSIZE,
deliver_sdu, ue,
successful_delivery, ue,
max_retx_reached, ue,
t_poll_retransmit,
t_reassembly, t_status_prohibit,
poll_pdu, poll_byte, max_retx_threshold,
sn_field_length);
nr_rlc_ue_add_drb_rlc_entity(ue, drb_id, nr_rlc_am);
LOG_I(RLC, "%s:%d:%s: added drb %d to UE with RNTI 0x%x\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
@@ -788,28 +741,15 @@ static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig)
{
nr_rlc_entity_t *nr_rlc_um;
nr_rlc_ue_t *ue;
struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config;
struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig;
int channel_id = rlc_BearerConfig->logicalChannelIdentity;
int logical_channel_group;
int sn_field_length;
int t_reassembly;
if (!(drb_id >= 1 && drb_id <= MAX_DRBS_PER_UE)) {
LOG_E(RLC, "%s:%d:%s: fatal, bad srb id %d\n",
__FILE__, __LINE__, __FUNCTION__, drb_id);
exit(1);
}
if (channel_id != drb_id + 3) {
LOG_E(RLC, "%s:%d:%s: todo, remove this limitation\n",
__FILE__, __LINE__, __FUNCTION__);
exit(1);
}
AssertFatal(drb_id > 0 && drb_id <= MAX_DRBS_PER_UE,
"Invalid DRB ID %d\n", drb_id);
logical_channel_group = *l->ul_SpecificParameters->logicalChannelGroup;
@@ -837,15 +777,22 @@ static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_Be
}
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
nr_rlc_ue_t *ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
AssertFatal(rlc_BearerConfig->servedRadioBearer &&
(rlc_BearerConfig->servedRadioBearer->present ==
NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity),
"servedRadioBearer for DRB mandatory present when setting up an SRB RLC entity\n");
int local_id = rlc_BearerConfig->logicalChannelIdentity - 1; // LCID 0 for SRB 0 not mapped
ue->lcid2rb[local_id].type = NR_RLC_DRB;
ue->lcid2rb[local_id].choice.drb_id = rlc_BearerConfig->servedRadioBearer->choice.drb_Identity;
if (ue->drb[drb_id-1] != NULL) {
LOG_W(RLC, "DEBUG add_drb_um %s:%d:%s: warning DRB %d already exist for ue %d, do nothing\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
LOG_E(RLC, "DEBUG add_drb_um %s:%d:%s: warning DRB %d already exist for ue %d, do nothing\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
} else {
nr_rlc_um = new_nr_rlc_entity_um(RLC_RX_MAXSIZE,
RLC_TX_MAXSIZE,
deliver_sdu, ue,
t_reassembly,
sn_field_length);
nr_rlc_entity_t *nr_rlc_um = new_nr_rlc_entity_um(RLC_RX_MAXSIZE,
RLC_TX_MAXSIZE,
deliver_sdu, ue,
t_reassembly,
sn_field_length);
nr_rlc_ue_add_drb_rlc_entity(ue, drb_id, nr_rlc_um);
LOG_D(RLC, "%s:%d:%s: added drb %d to UE with RNTI 0x%x\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
@@ -27,12 +27,26 @@
typedef void nr_rlc_ue_manager_t;
typedef enum nr_rlc_rb_type {
NR_RLC_SRB = 0,
NR_RLC_DRB = 1
} nr_rlc_rb_type;
typedef struct nr_rlc_rb_t {
nr_rlc_rb_type type;
union {
int srb_id;
int drb_id;
} choice;
} nr_rlc_rb_t;
typedef struct nr_rlc_ue_t {
int rnti;
ue_id_t ue_id;
nr_rlc_entity_t *srb0;
nr_rlc_entity_t *srb[3];
nr_rlc_entity_t *drb[MAX_DRBS_PER_UE];
nr_rlc_rb_t lcid2rb[32];
} nr_rlc_ue_t;
/***********************************************************************/
+81 -81
View File
@@ -166,48 +166,48 @@ typedef struct {
unsigned long dl_minfreq, dl_maxfreq;
} band_freq;
static band_freq bands[] = {
{ BAND_TYPE_FDD, 1, 1920000000UL, 1980000000UL, 2110000000UL, 2170000000UL },
{ BAND_TYPE_FDD, 2, 1850000000UL, 1910000000UL, 1930000000UL, 1990000000UL },
{ BAND_TYPE_FDD, 3, 1710000000UL, 1785000000UL, 1805000000UL, 1880000000UL },
{ BAND_TYPE_FDD, 4, 1710000000UL, 1755000000UL, 2110000000UL, 2155000000UL },
{ BAND_TYPE_FDD, 5, 824000000UL, 849000000UL, 869000000UL, 894000000UL },
/* to remove? */{ BAND_TYPE_FDD, 6, 830000000UL, 840000000UL, 875000000UL, 885000000UL },
{ BAND_TYPE_FDD, 7, 2500000000UL, 2570000000UL, 2620000000UL, 2690000000UL },
{ BAND_TYPE_FDD, 8, 880000000UL, 915000000UL, 925000000UL, 960000000UL },
{ BAND_TYPE_FDD, 9, 1749900000UL, 1784900000UL, 1844900000UL, 1879900000UL },
{ BAND_TYPE_FDD, 10, 1710000000UL, 1770000000UL, 2110000000UL, 2170000000UL },
{ BAND_TYPE_FDD, 11, 1427900000UL, 1447900000UL, 1475900000UL, 1495900000UL },
{ BAND_TYPE_FDD, 12, 699000000UL, 716000000UL, 729000000UL, 746000000UL },
{ BAND_TYPE_FDD, 13, 777000000UL, 787000000UL, 746000000UL, 756000000UL },
{ BAND_TYPE_FDD, 14, 788000000UL, 798000000UL, 758000000UL, 768000000UL },
{ BAND_TYPE_FDD, 17, 704000000UL, 716000000UL, 734000000UL, 746000000UL },
{ BAND_TYPE_FDD, 18, 815000000UL, 830000000UL, 860000000UL, 875000000UL },
{ BAND_TYPE_FDD, 19, 830000000UL, 845000000UL, 875000000UL, 890000000UL },
{ BAND_TYPE_FDD, 20, 832000000UL, 862000000UL, 791000000UL, 821000000UL },
{ BAND_TYPE_FDD, 21, 1447900000UL, 1462900000UL, 1495900000UL, 1510900000UL },
{ BAND_TYPE_FDD, 22, 3410000000UL, 3490000000UL, 3510000000UL, 3590000000UL },
{ BAND_TYPE_FDD, 23, 2000000000UL, 2020000000UL, 2180000000UL, 2200000000UL },
{ BAND_TYPE_FDD, 24, 1626500000UL, 1660500000UL, 1525000000UL, 1559000000UL },
{ BAND_TYPE_FDD, 25, 1850000000UL, 1915000000UL, 1930000000UL, 1995000000UL },
static const band_freq bands[] = {
{BAND_TYPE_FDD, 1, 1920000000UL, 1980000000UL, 2110000000UL, 2170000000UL},
{BAND_TYPE_FDD, 2, 1850000000UL, 1910000000UL, 1930000000UL, 1990000000UL},
{BAND_TYPE_FDD, 3, 1710000000UL, 1785000000UL, 1805000000UL, 1880000000UL},
{BAND_TYPE_FDD, 4, 1710000000UL, 1755000000UL, 2110000000UL, 2155000000UL},
{BAND_TYPE_FDD, 5, 824000000UL, 849000000UL, 869000000UL, 894000000UL},
/* to remove? */ {BAND_TYPE_FDD, 6, 830000000UL, 840000000UL, 875000000UL, 885000000UL},
{BAND_TYPE_FDD, 7, 2500000000UL, 2570000000UL, 2620000000UL, 2690000000UL},
{BAND_TYPE_FDD, 8, 880000000UL, 915000000UL, 925000000UL, 960000000UL},
{BAND_TYPE_FDD, 9, 1749900000UL, 1784900000UL, 1844900000UL, 1879900000UL},
{BAND_TYPE_FDD, 10, 1710000000UL, 1770000000UL, 2110000000UL, 2170000000UL},
{BAND_TYPE_FDD, 11, 1427900000UL, 1447900000UL, 1475900000UL, 1495900000UL},
{BAND_TYPE_FDD, 12, 699000000UL, 716000000UL, 729000000UL, 746000000UL},
{BAND_TYPE_FDD, 13, 777000000UL, 787000000UL, 746000000UL, 756000000UL},
{BAND_TYPE_FDD, 14, 788000000UL, 798000000UL, 758000000UL, 768000000UL},
{BAND_TYPE_FDD, 17, 704000000UL, 716000000UL, 734000000UL, 746000000UL},
{BAND_TYPE_FDD, 18, 815000000UL, 830000000UL, 860000000UL, 875000000UL},
{BAND_TYPE_FDD, 19, 830000000UL, 845000000UL, 875000000UL, 890000000UL},
{BAND_TYPE_FDD, 20, 832000000UL, 862000000UL, 791000000UL, 821000000UL},
{BAND_TYPE_FDD, 21, 1447900000UL, 1462900000UL, 1495900000UL, 1510900000UL},
{BAND_TYPE_FDD, 22, 3410000000UL, 3490000000UL, 3510000000UL, 3590000000UL},
{BAND_TYPE_FDD, 23, 2000000000UL, 2020000000UL, 2180000000UL, 2200000000UL},
{BAND_TYPE_FDD, 24, 1626500000UL, 1660500000UL, 1525000000UL, 1559000000UL},
{BAND_TYPE_FDD, 25, 1850000000UL, 1915000000UL, 1930000000UL, 1995000000UL},
{ BAND_TYPE_TDD, 33, 1900000000UL, 1920000000UL, 1900000000UL, 1920000000UL },
{ BAND_TYPE_TDD, 34, 2010000000UL, 2025000000UL, 2010000000UL, 2025000000UL },
{ BAND_TYPE_TDD, 35, 1850000000UL, 1910000000UL, 1850000000UL, 1910000000UL },
{ BAND_TYPE_TDD, 36, 1930000000UL, 1990000000UL, 1930000000UL, 1990000000UL },
{ BAND_TYPE_TDD, 37, 1910000000UL, 1930000000UL, 1910000000UL, 1930000000UL },
{ BAND_TYPE_TDD, 38, 2570000000UL, 2620000000UL, 2570000000UL, 2620000000UL },
{ BAND_TYPE_TDD, 39, 1880000000UL, 1920000000UL, 1880000000UL, 1920000000UL },
{ BAND_TYPE_TDD, 40, 2300000000UL, 2400000000UL, 2300000000UL, 2400000000UL },
{ BAND_TYPE_TDD, 41, 2496000000UL, 2690000000UL, 2496000000UL, 2690000000UL },
{ BAND_TYPE_TDD, 42, 3400000000UL, 3600000000UL, 3400000000UL, 3600000000UL },
{ BAND_TYPE_TDD, 43, 3600000000UL, 3800000000UL, 3600000000UL, 3800000000UL },
// ...
{ BAND_TYPE_FDD, 65, 1920000000UL, 2010000000UL, 2110000000UL, 2200000000UL},
{ BAND_TYPE_FDD, 66, 1710000000UL, 1780000000UL, 2110000000UL, 2200000000UL},
{ BAND_TYPE_FDD, 71, 663000000UL, 698000000UL, 617000000UL, 652000000UL },
{ BAND_TYPE_FDD, 72, 451000000UL, 456000000UL, 461000000UL, 466000000UL },
{ BAND_TYPE_FDD, 73, 450000000UL, 455000000UL, 460000000UL, 466000000UL },
{BAND_TYPE_TDD, 33, 1900000000UL, 1920000000UL, 1900000000UL, 1920000000UL},
{BAND_TYPE_TDD, 34, 2010000000UL, 2025000000UL, 2010000000UL, 2025000000UL},
{BAND_TYPE_TDD, 35, 1850000000UL, 1910000000UL, 1850000000UL, 1910000000UL},
{BAND_TYPE_TDD, 36, 1930000000UL, 1990000000UL, 1930000000UL, 1990000000UL},
{BAND_TYPE_TDD, 37, 1910000000UL, 1930000000UL, 1910000000UL, 1930000000UL},
{BAND_TYPE_TDD, 38, 2570000000UL, 2620000000UL, 2570000000UL, 2620000000UL},
{BAND_TYPE_TDD, 39, 1880000000UL, 1920000000UL, 1880000000UL, 1920000000UL},
{BAND_TYPE_TDD, 40, 2300000000UL, 2400000000UL, 2300000000UL, 2400000000UL},
{BAND_TYPE_TDD, 41, 2496000000UL, 2690000000UL, 2496000000UL, 2690000000UL},
{BAND_TYPE_TDD, 42, 3400000000UL, 3600000000UL, 3400000000UL, 3600000000UL},
{BAND_TYPE_TDD, 43, 3600000000UL, 3800000000UL, 3600000000UL, 3800000000UL},
// ...
{BAND_TYPE_FDD, 65, 1920000000UL, 2010000000UL, 2110000000UL, 2200000000UL},
{BAND_TYPE_FDD, 66, 1710000000UL, 1780000000UL, 2110000000UL, 2200000000UL},
{BAND_TYPE_FDD, 71, 663000000UL, 698000000UL, 617000000UL, 652000000UL},
{BAND_TYPE_FDD, 72, 451000000UL, 456000000UL, 461000000UL, 466000000UL},
{BAND_TYPE_FDD, 73, 450000000UL, 455000000UL, 460000000UL, 466000000UL},
};
typedef struct {
@@ -220,46 +220,46 @@ typedef struct {
int ul_offmin, ul_offmax;
} earfcn;
static earfcn earfcn_table[] = {
{ 1, 2110000000UL, 0, 0, 599, 1920000000UL, 18000, 18000, 18599 },
{ 2, 1930000000UL, 600, 600, 1199, 1850000000UL, 18600, 18600, 19199 },
{ 3, 1805000000UL, 1200, 1200, 1949, 1710000000UL, 19200, 19200, 19949 },
{ 4, 2110000000UL, 1950, 1950, 2399, 1710000000UL, 19950, 19950, 20399 },
{ 5, 869000000UL, 2400, 2400, 2649, 824000000UL, 20400, 20400, 20649 },
{ 6, 875000000UL, 2650, 2650, 2749, 830000000UL, 20650, 20650, 20749 },
{ 7, 2620000000UL, 2750, 2750, 3449, 2500000000UL, 20750, 20750, 21449 },
{ 8, 925000000UL, 3450, 3450, 3799, 880000000UL, 21450, 21450, 21799 },
{ 9, 1844900000UL, 3800, 3800, 4149, 1749900000UL, 21800, 21800, 22149 },
{ 10, 2110000000UL, 4150, 4150, 4749, 1710000000UL, 22150, 22150, 22749 },
{ 11, 1475900000UL, 4750, 4750, 4949, 1427900000UL, 22750, 22750, 22949 },
{ 12, 729000000UL, 5010, 5010, 5179, 699000000UL, 23010, 23010, 23179 },
{ 13, 746000000UL, 5180, 5180, 5279, 777000000UL, 23180, 23180, 23279 },
{ 14, 758000000UL, 5280, 5280, 5379, 788000000UL, 23280, 23280, 23379 },
{ 17, 734000000UL, 5730, 5730, 5849, 704000000UL, 23730, 23730, 23849 },
{ 18, 860000000UL, 5850, 5850, 5999, 815000000UL, 23850, 23850, 23999 },
{ 19, 875000000UL, 6000, 6000, 6149, 830000000UL, 24000, 24000, 24149 },
{ 20, 791000000UL, 6150, 6150, 6449, 832000000UL, 24150, 24150, 24449 },
{ 21, 1495900000UL, 6450, 6450, 6599, 1447900000UL, 24450, 24450, 24599 },
{ 22, 3510000000UL, 6600, 6600, 7399, 3410000000UL, 24600, 24600, 25399 },
{ 23, 2180000000UL, 7500, 7500, 7699, 2000000000UL, 25500, 25500, 25699 },
{ 24, 1525000000UL, 7700, 7700, 8039, 1626500000UL, 25700, 25700, 26039 },
{ 25, 1930000000UL, 8040, 8040, 8689, 1850000000UL, 26040, 26040, 26689 },
{ 33, 1900000000UL, 36000, 36000, 36199, 1900000000UL, 36000, 36000, 36199 },
{ 34, 2010000000UL, 36200, 36200, 36349, 2010000000UL, 36200, 36200, 36349 },
{ 35, 1850000000UL, 36350, 36350, 36949, 1850000000UL, 36350, 36350, 36949 },
{ 36, 1930000000UL, 36950, 36950, 37549, 1930000000UL, 36950, 36950, 37549 },
{ 37, 1910000000UL, 37550, 37550, 37749, 1910000000UL, 37550, 37550, 37749 },
{ 38, 2570000000UL, 37750, 37750, 38249, 2570000000UL, 37750, 37750, 38249 },
{ 39, 1880000000UL, 38250, 38250, 38649, 1880000000UL, 38250, 38250, 38649 },
{ 40, 2300000000UL, 38650, 38650, 39649, 2300000000UL, 38650, 38650, 39649 },
{ 41, 2496000000UL, 39650, 39650, 41589, 2496000000UL, 39650, 39650, 41589 },
{ 42, 3400000000UL, 41590, 41590, 43589, 3400000000UL, 41590, 41590, 43589 },
{ 43, 3600000000UL, 43590, 43590, 45589, 3600000000UL, 43590, 43590, 45589 },
// ...
{ 66, 2110000000UL, 66436, 66436, 67335, 17100000000UL, 131972, 131972, 132671},
{ 71, 617000000UL, 68586, 68586, 68935, 6630000000UL, 133122, 133122, 133471},
{ 72, 461000000UL, 68936, 68936, 68985, 4510000000UL, 133472, 133472, 133521},
{ 73, 460000000UL, 68986, 68986, 69035, 4500000000UL, 133522, 133522, 133571},
static const earfcn earfcn_table[] = {
{1, 2110000000UL, 0, 0, 599, 1920000000UL, 18000, 18000, 18599},
{2, 1930000000UL, 600, 600, 1199, 1850000000UL, 18600, 18600, 19199},
{3, 1805000000UL, 1200, 1200, 1949, 1710000000UL, 19200, 19200, 19949},
{4, 2110000000UL, 1950, 1950, 2399, 1710000000UL, 19950, 19950, 20399},
{5, 869000000UL, 2400, 2400, 2649, 824000000UL, 20400, 20400, 20649},
{6, 875000000UL, 2650, 2650, 2749, 830000000UL, 20650, 20650, 20749},
{7, 2620000000UL, 2750, 2750, 3449, 2500000000UL, 20750, 20750, 21449},
{8, 925000000UL, 3450, 3450, 3799, 880000000UL, 21450, 21450, 21799},
{9, 1844900000UL, 3800, 3800, 4149, 1749900000UL, 21800, 21800, 22149},
{10, 2110000000UL, 4150, 4150, 4749, 1710000000UL, 22150, 22150, 22749},
{11, 1475900000UL, 4750, 4750, 4949, 1427900000UL, 22750, 22750, 22949},
{12, 729000000UL, 5010, 5010, 5179, 699000000UL, 23010, 23010, 23179},
{13, 746000000UL, 5180, 5180, 5279, 777000000UL, 23180, 23180, 23279},
{14, 758000000UL, 5280, 5280, 5379, 788000000UL, 23280, 23280, 23379},
{17, 734000000UL, 5730, 5730, 5849, 704000000UL, 23730, 23730, 23849},
{18, 860000000UL, 5850, 5850, 5999, 815000000UL, 23850, 23850, 23999},
{19, 875000000UL, 6000, 6000, 6149, 830000000UL, 24000, 24000, 24149},
{20, 791000000UL, 6150, 6150, 6449, 832000000UL, 24150, 24150, 24449},
{21, 1495900000UL, 6450, 6450, 6599, 1447900000UL, 24450, 24450, 24599},
{22, 3510000000UL, 6600, 6600, 7399, 3410000000UL, 24600, 24600, 25399},
{23, 2180000000UL, 7500, 7500, 7699, 2000000000UL, 25500, 25500, 25699},
{24, 1525000000UL, 7700, 7700, 8039, 1626500000UL, 25700, 25700, 26039},
{25, 1930000000UL, 8040, 8040, 8689, 1850000000UL, 26040, 26040, 26689},
{33, 1900000000UL, 36000, 36000, 36199, 1900000000UL, 36000, 36000, 36199},
{34, 2010000000UL, 36200, 36200, 36349, 2010000000UL, 36200, 36200, 36349},
{35, 1850000000UL, 36350, 36350, 36949, 1850000000UL, 36350, 36350, 36949},
{36, 1930000000UL, 36950, 36950, 37549, 1930000000UL, 36950, 36950, 37549},
{37, 1910000000UL, 37550, 37550, 37749, 1910000000UL, 37550, 37550, 37749},
{38, 2570000000UL, 37750, 37750, 38249, 2570000000UL, 37750, 37750, 38249},
{39, 1880000000UL, 38250, 38250, 38649, 1880000000UL, 38250, 38250, 38649},
{40, 2300000000UL, 38650, 38650, 39649, 2300000000UL, 38650, 38650, 39649},
{41, 2496000000UL, 39650, 39650, 41589, 2496000000UL, 39650, 39650, 41589},
{42, 3400000000UL, 41590, 41590, 43589, 3400000000UL, 41590, 41590, 43589},
{43, 3600000000UL, 43590, 43590, 45589, 3600000000UL, 43590, 43590, 45589},
// ...
{66, 2110000000UL, 66436, 66436, 67335, 17100000000UL, 131972, 131972, 132671},
{71, 617000000UL, 68586, 68586, 68935, 6630000000UL, 133122, 133122, 133471},
{72, 461000000UL, 68936, 68936, 68985, 4510000000UL, 133472, 133472, 133521},
{73, 460000000UL, 68986, 68986, 69035, 4500000000UL, 133522, 133522, 133571},
};
int freq_to_arfcn10(int band, unsigned long freq) {
+2 -5
View File
@@ -71,11 +71,8 @@ LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {.ul_Specif
&logicalChannelSR_Mask_r9_ext1
};
LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {.ul_SpecificParameters=
&LCSRB2,
.ext1=
&logicalChannelSR_Mask_r9_ext1
};
const LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {.ul_SpecificParameters = &LCSRB2,
.ext1 = &logicalChannelSR_Mask_r9_ext1};
//CONSTANTS
uint16_t RACH_FREQ_ALLOC;
+1 -1
View File
@@ -60,7 +60,7 @@ void nas_getparams(void) {
// this datamodel require this static because we partially keep data like baseNetAddress (malloc on a global)
// but we loose the opther attributes in nasoptions between two calls if is is not static !
// clang-format off
static paramdef_t nasoptions[] = {
paramdef_t nasoptions[] = {
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* configuration parameters for netlink, includes network parameters when running in noS1 mode */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
+9 -8
View File
@@ -101,14 +101,15 @@ int opt_enabled=0;
//static unsigned int g_PDUOffset;
FILE *file_fd = NULL;
pcap_hdr_t file_header = {
0xa1b2c3d4, /* magic number */
2, 4, /* version number is 2.4 */
0, /* timezone */
0, /* sigfigs - apparently all tools do this */
65535, /* snaplen - this should be long enough */
DLT_IPV4
//MAC_LTE_DLT /* Data Link Type (DLT). Set as unused value 147 for now */
const pcap_hdr_t file_header = {
0xa1b2c3d4, /* magic number */
2,
4, /* version number is 2.4 */
0, /* timezone */
0, /* sigfigs - apparently all tools do this */
65535, /* snaplen - this should be long enough */
DLT_IPV4
// MAC_LTE_DLT /* Data Link Type (DLT). Set as unused value 147 for now */
};
trace_mode_t opt_type = OPT_NONE;
+7 -7
View File
@@ -27,13 +27,13 @@
int errorCodeEncoder = 0;
const char *errorCodeStringEncoder[] = {
"No error",
"Buffer NULL",
"Buffer too short",
"Octet string too long for IEI",
"Wrong message type",
"Protocol not supported",
const char *const errorCodeStringEncoder[] = {
"No error",
"Buffer NULL",
"Buffer too short",
"Octet string too long for IEI",
"Wrong message type",
"Protocol not supported",
};
void tlv_encode_perror(void)
+87 -89
View File
@@ -68,129 +68,127 @@ typedef struct sttyset_s {
} sttyset_t;
/* Table of terminal I/O parameters */
static sttyset_t stty_params[] = {
{ "0", BFLG, 0, B0 },
{ "50", BFLG, 0, B50 },
{ "75", BFLG, 0, B75 },
{ "110", BFLG, 0, B110 },
{ "134", BFLG, 0, B134 },
{ "150", BFLG, 0, B150 },
{ "200", BFLG, 0, B200 },
{ "300", BFLG, 0, B300 },
{ "600", BFLG, 0, B600 },
{ "1200", BFLG, 0, B1200 },
{ "1800", BFLG, 0, B1800 },
{ "2400", BFLG, 0, B2400 },
{ "4800", BFLG, 0, B4800 },
{ "9600", BFLG, 0, B9600 },
{ "19200", BFLG, 0, B19200 },
{ "38400", BFLG, 0, B38400 },
static const sttyset_t stty_params[] = {{"0", BFLG, 0, B0},
{"50", BFLG, 0, B50},
{"75", BFLG, 0, B75},
{"110", BFLG, 0, B110},
{"134", BFLG, 0, B134},
{"150", BFLG, 0, B150},
{"200", BFLG, 0, B200},
{"300", BFLG, 0, B300},
{"600", BFLG, 0, B600},
{"1200", BFLG, 0, B1200},
{"1800", BFLG, 0, B1800},
{"2400", BFLG, 0, B2400},
{"4800", BFLG, 0, B4800},
{"9600", BFLG, 0, B9600},
{"19200", BFLG, 0, B19200},
{"38400", BFLG, 0, B38400},
#ifdef B57600
{ "57600", BFLG, 0, B57600 },
{"57600", BFLG, 0, B57600},
#endif
#ifdef B115200
{ "115200", BFLG, 0, B115200 },
{"115200", BFLG, 0, B115200},
#endif
#ifdef B230400
{ "230400", BFLG, 0, B230400 },
{"230400", BFLG, 0, B230400},
#endif
{ "cs7", CFLG, CSIZE, CS7 },
{ "cs8", CFLG, CSIZE, CS8 },
{ "cstopb", CFLG, CSTOPB, CSTOPB },
{ "cread", CFLG, CREAD, CREAD },
{ "parenb", CFLG, PARENB, PARENB },
{ "parodd", CFLG, PARODD, PARODD },
{ "hubcl", CFLG, HUPCL, HUPCL },
{ "clocal", CFLG, CLOCAL, CLOCAL },
{"cs7", CFLG, CSIZE, CS7},
{"cs8", CFLG, CSIZE, CS8},
{"cstopb", CFLG, CSTOPB, CSTOPB},
{"cread", CFLG, CREAD, CREAD},
{"parenb", CFLG, PARENB, PARENB},
{"parodd", CFLG, PARODD, PARODD},
{"hubcl", CFLG, HUPCL, HUPCL},
{"clocal", CFLG, CLOCAL, CLOCAL},
#ifdef CRTSCTS
{ "crtscts",CFLG, CRTSCTS, CRTSCTS },
{"crtscts", CFLG, CRTSCTS, CRTSCTS},
#endif
#ifdef ORTSFL
{ "ortsfl", CFLG, ORTSFL, ORTSFL },
{"ortsfl", CFLG, ORTSFL, ORTSFL},
#endif
#ifdef CTSFLOW
{ "ctsflow",CFLG, CTSFLOW, CTSFLOW },
{"ctsflow", CFLG, CTSFLOW, CTSFLOW},
#endif
#ifdef RTSFLOW
{ "rtsflow",CFLG, RTSFLOW, RTSFLOW },
{"rtsflow", CFLG, RTSFLOW, RTSFLOW},
#endif
{ "ignbrk", IFLG, IGNBRK, IGNBRK },
{ "brkint", IFLG, BRKINT, BRKINT },
{ "ignpar", IFLG, IGNPAR, IGNPAR },
{ "parmrk", IFLG, PARMRK, PARMRK },
{ "inpck", IFLG, INPCK, INPCK },
{ "istrip", IFLG, ISTRIP, ISTRIP },
{ "inlcr", IFLG, INLCR, INLCR },
{ "igncr", IFLG, IGNCR, IGNCR },
{ "icrnl", IFLG, ICRNL, ICRNL },
{"ignbrk", IFLG, IGNBRK, IGNBRK},
{"brkint", IFLG, BRKINT, BRKINT},
{"ignpar", IFLG, IGNPAR, IGNPAR},
{"parmrk", IFLG, PARMRK, PARMRK},
{"inpck", IFLG, INPCK, INPCK},
{"istrip", IFLG, ISTRIP, ISTRIP},
{"inlcr", IFLG, INLCR, INLCR},
{"igncr", IFLG, IGNCR, IGNCR},
{"icrnl", IFLG, ICRNL, ICRNL},
#ifdef IUCLC // Missing on OSX, FreeBSD
{ "iuclc", IFLG, IUCLC, IUCLC },
{"iuclc", IFLG, IUCLC, IUCLC},
#endif
{ "ixon", IFLG, IXON, IXON },
{ "ixany", IFLG, IXANY, IXANY },
{ "ixoff", IFLG, IXOFF, IXOFF },
{"ixon", IFLG, IXON, IXON},
{"ixany", IFLG, IXANY, IXANY},
{"ixoff", IFLG, IXOFF, IXOFF},
#ifdef IMAXBEL
{ "imaxbel",IFLG, IMAXBEL, IMAXBEL },
{"imaxbel", IFLG, IMAXBEL, IMAXBEL},
#endif
{ "opost", OFLG, OPOST, OPOST },
{"opost", OFLG, OPOST, OPOST},
#ifdef ILCUC // Missing on OSX, FreeBSD
{ "olcuc", OFLG, OLCUC, OLCUC },
{"olcuc", OFLG, OLCUC, OLCUC},
#endif
{ "onlcr", OFLG, ONLCR, ONLCR },
{ "ocrnl", OFLG, OCRNL, OCRNL },
{ "onocr", OFLG, ONOCR, ONOCR },
{ "onlret", OFLG, ONLRET, ONLRET },
{ "ofil", OFLG, OFILL, OFILL },
{ "ofdel", OFLG, OFDEL, OFDEL },
{ "nl0", OFLG, NLDLY, NL0 },
{ "nl1", OFLG, NLDLY, NL1 },
{ "cr0", OFLG, CRDLY, CR0 },
{ "cr1", OFLG, CRDLY, CR1 },
{ "cr2", OFLG, CRDLY, CR2 },
{ "cr3", OFLG, CRDLY, CR3 },
{ "tab0", OFLG, TABDLY, TAB0 },
{ "tab1", OFLG, TABDLY, TAB1 },
{ "tab2", OFLG, TABDLY, TAB2 },
{ "tab3", OFLG, TABDLY, TAB3 },
{ "bs0", OFLG, BSDLY, BS0 },
{ "bs1", OFLG, BSDLY, BS1 },
{ "vt0", OFLG, VTDLY, VT0 },
{ "vt1", OFLG, VTDLY, VT1 },
{ "ff0", OFLG, FFDLY, FF0 },
{ "ff1", OFLG, FFDLY, FF1 },
{ "isig", LFLG, ISIG, ISIG },
{ "icanon", LFLG, ICANON, ICANON },
{"onlcr", OFLG, ONLCR, ONLCR},
{"ocrnl", OFLG, OCRNL, OCRNL},
{"onocr", OFLG, ONOCR, ONOCR},
{"onlret", OFLG, ONLRET, ONLRET},
{"ofil", OFLG, OFILL, OFILL},
{"ofdel", OFLG, OFDEL, OFDEL},
{"nl0", OFLG, NLDLY, NL0},
{"nl1", OFLG, NLDLY, NL1},
{"cr0", OFLG, CRDLY, CR0},
{"cr1", OFLG, CRDLY, CR1},
{"cr2", OFLG, CRDLY, CR2},
{"cr3", OFLG, CRDLY, CR3},
{"tab0", OFLG, TABDLY, TAB0},
{"tab1", OFLG, TABDLY, TAB1},
{"tab2", OFLG, TABDLY, TAB2},
{"tab3", OFLG, TABDLY, TAB3},
{"bs0", OFLG, BSDLY, BS0},
{"bs1", OFLG, BSDLY, BS1},
{"vt0", OFLG, VTDLY, VT0},
{"vt1", OFLG, VTDLY, VT1},
{"ff0", OFLG, FFDLY, FF0},
{"ff1", OFLG, FFDLY, FF1},
{"isig", LFLG, ISIG, ISIG},
{"icanon", LFLG, ICANON, ICANON},
#ifdef XCASE // Missing on OSX, FreeBSD
{ "xcase", LFLG, XCASE, XCASE },
{"xcase", LFLG, XCASE, XCASE},
#endif
{ "echo", LFLG, ECHO, ECHO },
{ "echoe", LFLG, ECHOE, ECHOE },
{ "echok", LFLG, ECHOK, ECHOK },
{ "echonl", LFLG, ECHONL, ECHONL },
{ "noflsh", LFLG, NOFLSH, NOFLSH },
{ "tostop", LFLG, TOSTOP, TOSTOP },
{"echo", LFLG, ECHO, ECHO},
{"echoe", LFLG, ECHOE, ECHOE},
{"echok", LFLG, ECHOK, ECHOK},
{"echonl", LFLG, ECHONL, ECHONL},
{"noflsh", LFLG, NOFLSH, NOFLSH},
{"tostop", LFLG, TOSTOP, TOSTOP},
#ifdef ECHOCTL
{ "echoctl",LFLG, ECHOCTL, ECHOCTL },
{"echoctl", LFLG, ECHOCTL, ECHOCTL},
#endif
#ifdef ECHOPRT
{ "echoprt",LFLG, ECHOPRT, ECHOPRT },
{"echoprt", LFLG, ECHOPRT, ECHOPRT},
#endif
#ifdef ECHOKE
{ "echoke", LFLG, ECHOKE, ECHOKE },
{"echoke", LFLG, ECHOKE, ECHOKE},
#endif
#ifdef FLUSHO
{ "flusho", LFLG, FLUSHO, FLUSHO },
{"flusho", LFLG, FLUSHO, FLUSHO},
#endif
#ifdef PENDIN
{ "pendin", LFLG, PENDIN, PENDIN },
{"pendin", LFLG, PENDIN, PENDIN},
#endif
{ "iexten", LFLG, IEXTEN, IEXTEN },
{"iexten", LFLG, IEXTEN, IEXTEN},
#ifdef TOSTOP
{ "tostop", LFLG, TOSTOP, TOSTOP },
{"tostop", LFLG, TOSTOP, TOSTOP},
#endif
{ "raw", RFLG, 0, 0 },
{ NULL, 0, 0, 0 }
};
{"raw", RFLG, 0, 0},
{NULL, 0, 0, 0}};
static int _stty_set_this(struct termios *term, const sttyset_t *p, bool turnon);
+118 -118
View File
@@ -74,136 +74,136 @@ at_error_format_t at_error_format = AT_ERROR_OFF;
* General errors
* --------------
*/
static const char * _at_error_str[] = {
"phone failure",
"no connection to phone",
"phone-adaptor link reserved",
"operation not allowed",
"operation not supported",
"PH-SIM PIN required",
"PH-FSIM PIN required",
"PH-FSIM PUK required",
NULL,
NULL,
"SIM not inserted",
"SIM PIN required",
"SIM PUK required",
"SIM failure",
"SIM busy",
"SIM wrong",
"incorrect password",
"SIM PIN2 required",
"SIM PUK2 required",
NULL,
"memory full",
"invalid index",
"not found",
"memory failure",
"text string too long",
"invalid characters in text string",
"dial string too long",
"invalid characters in dial string",
NULL,
NULL,
"no network service",
"network timeout",
"network not allowed - emergency calls only",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"network personalization PIN required",
"network personalization PUK required",
"network subset personalization PIN required",
"network subset personalization PUK required",
"service provider personalization PIN required",
"service provider personalization PUK required",
"corporate personalization PIN required",
"corporate personalization PUK required",
"hidden key required",
"EAP method not supported",
"Incorrect parameters",
static const char* const _at_error_str[] = {
"phone failure",
"no connection to phone",
"phone-adaptor link reserved",
"operation not allowed",
"operation not supported",
"PH-SIM PIN required",
"PH-FSIM PIN required",
"PH-FSIM PUK required",
NULL,
NULL,
"SIM not inserted",
"SIM PIN required",
"SIM PUK required",
"SIM failure",
"SIM busy",
"SIM wrong",
"incorrect password",
"SIM PIN2 required",
"SIM PUK2 required",
NULL,
"memory full",
"invalid index",
"not found",
"memory failure",
"text string too long",
"invalid characters in text string",
"dial string too long",
"invalid characters in dial string",
NULL,
NULL,
"no network service",
"network timeout",
"network not allowed - emergency calls only",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"network personalization PIN required",
"network personalization PUK required",
"network subset personalization PIN required",
"network subset personalization PUK required",
"service provider personalization PIN required",
"service provider personalization PUK required",
"corporate personalization PIN required",
"corporate personalization PUK required",
"hidden key required",
"EAP method not supported",
"Incorrect parameters",
};
/*
* GPRS-related errors
* -------------------
*/
static const char* _at_error_gprs[] = {
"Illegal MS",
NULL,
NULL,
"Illegal ME",
"GPRS services not allowed",
NULL,
NULL,
NULL,
"PLMN not allowed",
"Location area not allowed",
"Roaming not allowed in this location area",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"service option not supported",
"requested service option not subscribed",
"service option temporarily out of order",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"unspecified GPRS error",
"PDP authentication failure",
"invalid mobile class",
"Last PDN disconnection not allowed",
static const char* const _at_error_gprs[] = {
"Illegal MS",
NULL,
NULL,
"Illegal ME",
"GPRS services not allowed",
NULL,
NULL,
NULL,
"PLMN not allowed",
"Location area not allowed",
"Roaming not allowed in this location area",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"service option not supported",
"requested service option not subscribed",
"service option temporarily out of order",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"unspecified GPRS error",
"PDP authentication failure",
"invalid mobile class",
"Last PDN disconnection not allowed",
};
/*
* VBS / VGCS and eMLPP -related errors
* ------------------------------------
*/
static const char* _at_error_vbs[] = {
/* 151 "VBS/VGCS not supported by the network" */
"No service subscription on SIM",
"No subscription for group ID",
"Group Id not activated on SIM",
"No matching notification",
"VBS/VGCS call already present",
"Congestion",
"Network failure",
"Uplink busy",
"No access rights for SIM file",
"No subscription for priority",
"operation not applicable or not possible",
"Group Id prefixes not supported",
"Group Id prefixes not usable for VBS",
"Group Id prefix value invalid",
static const char* const _at_error_vbs[] = {
/* 151 "VBS/VGCS not supported by the network" */
"No service subscription on SIM",
"No subscription for group ID",
"Group Id not activated on SIM",
"No matching notification",
"VBS/VGCS call already present",
"Congestion",
"Network failure",
"Uplink busy",
"No access rights for SIM file",
"No subscription for priority",
"operation not applicable or not possible",
"Group Id prefixes not supported",
"Group Id prefixes not usable for VBS",
"Group Id prefix value invalid",
};
/* Returns the verbose value of AT command error */
+22 -22
View File
@@ -89,28 +89,28 @@ typedef int (*_at_response_encode_function_t) (char* buffer, const at_response_t
static _at_response_encode_function_t _at_response_encode_function[AT_RESPONSE_ID_MAX] = {
NULL,
_at_response_encode_cgsn, /* CGSN */
_at_response_encode_cgmi, /* CGMI */
_at_response_encode_cgmm, /* CGMM */
_at_response_encode_cgmr, /* CGMR */
_at_response_encode_cimi, /* CIMI */
_at_response_encode_cfun, /* CFUN */
_at_response_encode_cpin, /* CPIN */
_at_response_encode_csq, /* CSQ */
_at_response_encode_cesq, /* CESQ */
_at_response_encode_clac, /* CLAC */
_at_response_encode_cmee, /* CMEE */
_at_response_encode_cnum, /* CNUM */
_at_response_encode_clck, /* CLCK */
_at_response_encode_cops, /* COPS */
_at_response_encode_creg, /* CREG */
_at_response_encode_cgatt, /* CGATT */
_at_response_encode_cgreg, /* CGREG */
_at_response_encode_cereg, /* CEREG */
_at_response_encode_cgdcont, /* CGDCONT */
_at_response_encode_cgact, /* CGACT */
_at_response_encode_cgpaddr, /* CGPADDR */
_at_response_encode_cgev, /* CGEV: unsolicited result */
_at_response_encode_cgsn, /* CGSN */
_at_response_encode_cgmi, /* CGMI */
_at_response_encode_cgmm, /* CGMM */
_at_response_encode_cgmr, /* CGMR */
_at_response_encode_cimi, /* CIMI */
_at_response_encode_cfun, /* CFUN */
_at_response_encode_cpin, /* CPIN */
_at_response_encode_csq, /* CSQ */
_at_response_encode_cesq, /* CESQ */
_at_response_encode_clac, /* CLAC */
_at_response_encode_cmee, /* CMEE */
_at_response_encode_cnum, /* CNUM */
_at_response_encode_clck, /* CLCK */
_at_response_encode_cops, /* COPS */
_at_response_encode_creg, /* CREG */
_at_response_encode_cgatt, /* CGATT */
_at_response_encode_cgreg, /* CGREG */
_at_response_encode_cereg, /* CEREG */
_at_response_encode_cgdcont, /* CGDCONT */
_at_response_encode_cgact, /* CGACT */
_at_response_encode_cgpaddr, /* CGPADDR */
_at_response_encode_cgev, /* CGEV: unsolicited result */
};
/* String representation of Packet Domain events (cf. network_pdn_state_t) */
+24 -35
View File
@@ -305,44 +305,33 @@ void ComputeOPc(const u8 op[16], u8 op_c_pP[16])
/*-------------------- Rijndael round subkeys ---------------------*/
u8 roundKeys[11][4][4];
/*--------------------- Rijndael S box table ----------------------*/
u8 S[256] = {
99,124,119,123,242,107,111,197, 48, 1,103, 43,254,215,171,118,
202,130,201,125,250, 89, 71,240,173,212,162,175,156,164,114,192,
183,253,147, 38, 54, 63,247,204, 52,165,229,241,113,216, 49, 21,
4,199, 35,195, 24,150, 5,154, 7, 18,128,226,235, 39,178,117,
9,131, 44, 26, 27,110, 90,160, 82, 59,214,179, 41,227, 47,132,
83,209, 0,237, 32,252,177, 91,106,203,190, 57, 74, 76, 88,207,
208,239,170,251, 67, 77, 51,133, 69,249, 2,127, 80, 60,159,168,
81,163, 64,143,146,157, 56,245,188,182,218, 33, 16,255,243,210,
205, 12, 19,236, 95,151, 68, 23,196,167,126, 61,100, 93, 25,115,
96,129, 79,220, 34, 42,144,136, 70,238,184, 20,222, 94, 11,219,
224, 50, 58, 10, 73, 6, 36, 92,194,211,172, 98,145,149,228,121,
231,200, 55,109,141,213, 78,169,108, 86,244,234,101,122,174, 8,
186,120, 37, 46, 28,166,180,198,232,221,116, 31, 75,189,139,138,
112, 62,181,102, 72, 3,246, 14, 97, 53, 87,185,134,193, 29,158,
225,248,152, 17,105,217,142,148,155, 30,135,233,206, 85, 40,223,
140,161,137, 13,191,230, 66,104, 65,153, 45, 15,176, 84,187, 22,
const u8 S[256] = {
99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240,
173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21,
4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160,
82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207,
208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245,
188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115,
96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92,
194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8,
186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14,
97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223,
140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22,
};
/*------- This array does the multiplication by x in GF(2^8) ------*/
u8 Xtime[256] = {
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,
32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62,
64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94,
96, 98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,
160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,
192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,
224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,
27, 25, 31, 29, 19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5,
59, 57, 63, 61, 51, 49, 55, 53, 43, 41, 47, 45, 35, 33, 39, 37,
91, 89, 95, 93, 83, 81, 87, 85, 75, 73, 79, 77, 67, 65, 71, 69,
123,121,127,125,115,113,119,117,107,105,111,109, 99, 97,103,101,
155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133,
187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165,
219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197,
251,249,255,253,243,241,247,245,235,233,239,237,227,225,231,229
};
const u8 Xtime[256] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42,
44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86,
88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130,
132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174,
176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218,
220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 27, 25, 31, 29,
19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5, 59, 57, 63, 61, 51, 49, 55, 53, 43, 41,
47, 45, 35, 33, 39, 37, 91, 89, 95, 93, 83, 81, 87, 85, 75, 73, 79, 77, 67, 65, 71, 69,
123, 121, 127, 125, 115, 113, 119, 117, 107, 105, 111, 109, 99, 97, 103, 101, 155, 153, 159, 157, 147, 145,
151, 149, 139, 137, 143, 141, 131, 129, 135, 133, 187, 185, 191, 189, 179, 177, 183, 181, 171, 169, 175, 173,
163, 161, 167, 165, 219, 217, 223, 221, 211, 209, 215, 213, 203, 201, 207, 205, 195, 193, 199, 197, 251, 249,
255, 253, 243, 241, 247, 245, 235, 233, 239, 237, 227, 225, 231, 229};
/*-------------------------------------------------------------------
* Rijndael key schedule function. Takes 16-byte key and creates
* all Rijndael's internal subkeys ready for encryption.
+24 -29
View File
@@ -91,29 +91,29 @@ static int _nas_user_proc_clac (nas_user_t *user, const at_command_t *data);
/* NAS procedures applicable to AT commands */
typedef int (*_nas_user_procedure_t) (nas_user_t *, const at_command_t *);
static _nas_user_procedure_t _nas_user_procedure[AT_COMMAND_ID_MAX] = {
NULL,
_nas_user_proc_cgsn, /* CGSN */
_nas_user_proc_cgmi, /* CGMI */
_nas_user_proc_cgmm, /* CGMM */
_nas_user_proc_cgmr, /* CGMR */
_nas_user_proc_cimi, /* CIMI */
_nas_user_proc_cfun, /* CFUN */
_nas_user_proc_cpin, /* CPIN */
_nas_user_proc_csq, /* CSQ */
_nas_user_proc_cesq, /* CESQ */
_nas_user_proc_clac, /* CLAC */
_nas_user_proc_cmee, /* CMEE */
_nas_user_proc_cnum, /* CNUM */
_nas_user_proc_clck, /* CLCK */
_nas_user_proc_cops, /* COPS */
_nas_user_proc_creg, /* CREG */
_nas_user_proc_cgatt, /* CGATT */
_nas_user_proc_cgreg, /* CGREG */
_nas_user_proc_cereg, /* CEREG */
_nas_user_proc_cgdcont, /* CGDCONT */
_nas_user_proc_cgact, /* CGACT */
_nas_user_proc_cgpaddr, /* CGPADDR */
static const _nas_user_procedure_t _nas_user_procedure[AT_COMMAND_ID_MAX] = {
NULL,
_nas_user_proc_cgsn, /* CGSN */
_nas_user_proc_cgmi, /* CGMI */
_nas_user_proc_cgmm, /* CGMM */
_nas_user_proc_cgmr, /* CGMR */
_nas_user_proc_cimi, /* CIMI */
_nas_user_proc_cfun, /* CFUN */
_nas_user_proc_cpin, /* CPIN */
_nas_user_proc_csq, /* CSQ */
_nas_user_proc_cesq, /* CESQ */
_nas_user_proc_clac, /* CLAC */
_nas_user_proc_cmee, /* CMEE */
_nas_user_proc_cnum, /* CNUM */
_nas_user_proc_clck, /* CLCK */
_nas_user_proc_cops, /* COPS */
_nas_user_proc_creg, /* CREG */
_nas_user_proc_cgatt, /* CGATT */
_nas_user_proc_cgreg, /* CGREG */
_nas_user_proc_cereg, /* CEREG */
_nas_user_proc_cgdcont, /* CGDCONT */
_nas_user_proc_cgact, /* CGACT */
_nas_user_proc_cgpaddr, /* CGPADDR */
};
/*
@@ -122,12 +122,7 @@ static _nas_user_procedure_t _nas_user_procedure[AT_COMMAND_ID_MAX] = {
* ---------------------------------------------------------------------
*/
static const char *_nas_user_sim_status_str[] = {
"READY",
"SIM PIN",
"SIM PUK",
"PH-SIM PIN"
};
static const char *const _nas_user_sim_status_str[] = {"READY", "SIM PIN", "SIM PUK", "PH-SIM PIN"};
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
+1 -1
View File
@@ -1290,7 +1290,7 @@ int ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm(uint32_t
}
/* Handlers matrix. Only gNB related procedure present here */
ngap_message_decoded_callback ngap_messages_callback[][3] = {
const ngap_message_decoded_callback ngap_messages_callback[][3] = {
{0, 0, 0}, /* AMFConfigurationUpdate */
{0, 0, 0}, /* AMFStatusIndication */
{0, 0, 0}, /* CellTrafficTrace */
+28 -36
View File
@@ -22,42 +22,34 @@
#include <stdint.h>
/* Rijndael S-box SR */
uint8_t SR[256] = {
0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76,
0xCA,0x82,0xC9,0x7D,0xFA,0x59,0x47,0xF0,0xAD,0xD4,0xA2,0xAF,0x9C,0xA4,0x72,0xC0,
0xB7,0xFD,0x93,0x26,0x36,0x3F,0xF7,0xCC,0x34,0xA5,0xE5,0xF1,0x71,0xD8,0x31,0x15,
0x04,0xC7,0x23,0xC3,0x18,0x96,0x05,0x9A,0x07,0x12,0x80,0xE2,0xEB,0x27,0xB2,0x75,
0x09,0x83,0x2C,0x1A,0x1B,0x6E,0x5A,0xA0,0x52,0x3B,0xD6,0xB3,0x29,0xE3,0x2F,0x84,
0x53,0xD1,0x00,0xED,0x20,0xFC,0xB1,0x5B,0x6A,0xCB,0xBE,0x39,0x4A,0x4C,0x58,0xCF,
0xD0,0xEF,0xAA,0xFB,0x43,0x4D,0x33,0x85,0x45,0xF9,0x02,0x7F,0x50,0x3C,0x9F,0xA8,
0x51,0xA3,0x40,0x8F,0x92,0x9D,0x38,0xF5,0xBC,0xB6,0xDA,0x21,0x10,0xFF,0xF3,0xD2,
0xCD,0x0C,0x13,0xEC,0x5F,0x97,0x44,0x17,0xC4,0xA7,0x7E,0x3D,0x64,0x5D,0x19,0x73,
0x60,0x81,0x4F,0xDC,0x22,0x2A,0x90,0x88,0x46,0xEE,0xB8,0x14,0xDE,0x5E,0x0B,0xDB,
0xE0,0x32,0x3A,0x0A,0x49,0x06,0x24,0x5C,0xC2,0xD3,0xAC,0x62,0x91,0x95,0xE4,0x79,
0xE7,0xC8,0x37,0x6D,0x8D,0xD5,0x4E,0xA9,0x6C,0x56,0xF4,0xEA,0x65,0x7A,0xAE,0x08,
0xBA,0x78,0x25,0x2E,0x1C,0xA6,0xB4,0xC6,0xE8,0xDD,0x74,0x1F,0x4B,0xBD,0x8B,0x8A,
0x70,0x3E,0xB5,0x66,0x48,0x03,0xF6,0x0E,0x61,0x35,0x57,0xB9,0x86,0xC1,0x1D,0x9E,
0xE1,0xF8,0x98,0x11,0x69,0xD9,0x8E,0x94,0x9B,0x1E,0x87,0xE9,0xCE,0x55,0x28,0xDF,
0x8C,0xA1,0x89,0x0D,0xBF,0xE6,0x42,0x68,0x41,0x99,0x2D,0x0F,0xB0,0x54,0xBB,0x16
};
const uint8_t SR[256] = {
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, 0xCA, 0x82, 0xC9, 0x7D,
0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC,
0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15, 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2,
0xEB, 0x27, 0xB2, 0x75, 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF, 0xD0, 0xEF, 0xAA, 0xFB,
0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8, 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5,
0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2, 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D,
0x64, 0x5D, 0x19, 0x73, 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79, 0xE7, 0xC8, 0x37, 0x6D,
0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08, 0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6,
0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A, 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9,
0x86, 0xC1, 0x1D, 0x9E, 0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16};
/* S-box SQ */
uint8_t SQ[256] = {
0x25,0x24,0x73,0x67,0xD7,0xAE,0x5C,0x30,0xA4,0xEE,0x6E,0xCB,0x7D,0xB5,0x82,0xDB,
0xE4,0x8E,0x48,0x49,0x4F,0x5D,0x6A,0x78,0x70,0x88,0xE8,0x5F,0x5E,0x84,0x65,0xE2,
0xD8,0xE9,0xCC,0xED,0x40,0x2F,0x11,0x28,0x57,0xD2,0xAC,0xE3,0x4A,0x15,0x1B,0xB9,
0xB2,0x80,0x85,0xA6,0x2E,0x02,0x47,0x29,0x07,0x4B,0x0E,0xC1,0x51,0xAA,0x89,0xD4,
0xCA,0x01,0x46,0xB3,0xEF,0xDD,0x44,0x7B,0xC2,0x7F,0xBE,0xC3,0x9F,0x20,0x4C,0x64,
0x83,0xA2,0x68,0x42,0x13,0xB4,0x41,0xCD,0xBA,0xC6,0xBB,0x6D,0x4D,0x71,0x21,0xF4,
0x8D,0xB0,0xE5,0x93,0xFE,0x8F,0xE6,0xCF,0x43,0x45,0x31,0x22,0x37,0x36,0x96,0xFA,
0xBC,0x0F,0x08,0x52,0x1D,0x55,0x1A,0xC5,0x4E,0x23,0x69,0x7A,0x92,0xFF,0x5B,0x5A,
0xEB,0x9A,0x1C,0xA9,0xD1,0x7E,0x0D,0xFC,0x50,0x8A,0xB6,0x62,0xF5,0x0A,0xF8,0xDC,
0x03,0x3C,0x0C,0x39,0xF1,0xB8,0xF3,0x3D,0xF2,0xD5,0x97,0x66,0x81,0x32,0xA0,0x00,
0x06,0xCE,0xF6,0xEA,0xB7,0x17,0xF7,0x8C,0x79,0xD6,0xA7,0xBF,0x8B,0x3F,0x1F,0x53,
0x63,0x75,0x35,0x2C,0x60,0xFD,0x27,0xD3,0x94,0xA5,0x7C,0xA1,0x05,0x58,0x2D,0xBD,
0xD9,0xC7,0xAF,0x6B,0x54,0x0B,0xE0,0x38,0x04,0xC8,0x9D,0xE7,0x14,0xB1,0x87,0x9C,
0xDF,0x6F,0xF9,0xDA,0x2A,0xC4,0x59,0x16,0x74,0x91,0xAB,0x26,0x61,0x76,0x34,0x2B,
0xAD,0x99,0xFB,0x72,0xEC,0x33,0x12,0xDE,0x98,0x3B,0xC0,0x9B,0x3E,0x18,0x10,0x3A,
0x56,0xE1,0x77,0xC9,0x1E,0x9E,0x95,0xA3,0x90,0x19,0xA8,0x6C,0x09,0xD0,0xF0,0x86
};
const uint8_t SQ[256] = {
0x25, 0x24, 0x73, 0x67, 0xD7, 0xAE, 0x5C, 0x30, 0xA4, 0xEE, 0x6E, 0xCB, 0x7D, 0xB5, 0x82, 0xDB, 0xE4, 0x8E, 0x48, 0x49,
0x4F, 0x5D, 0x6A, 0x78, 0x70, 0x88, 0xE8, 0x5F, 0x5E, 0x84, 0x65, 0xE2, 0xD8, 0xE9, 0xCC, 0xED, 0x40, 0x2F, 0x11, 0x28,
0x57, 0xD2, 0xAC, 0xE3, 0x4A, 0x15, 0x1B, 0xB9, 0xB2, 0x80, 0x85, 0xA6, 0x2E, 0x02, 0x47, 0x29, 0x07, 0x4B, 0x0E, 0xC1,
0x51, 0xAA, 0x89, 0xD4, 0xCA, 0x01, 0x46, 0xB3, 0xEF, 0xDD, 0x44, 0x7B, 0xC2, 0x7F, 0xBE, 0xC3, 0x9F, 0x20, 0x4C, 0x64,
0x83, 0xA2, 0x68, 0x42, 0x13, 0xB4, 0x41, 0xCD, 0xBA, 0xC6, 0xBB, 0x6D, 0x4D, 0x71, 0x21, 0xF4, 0x8D, 0xB0, 0xE5, 0x93,
0xFE, 0x8F, 0xE6, 0xCF, 0x43, 0x45, 0x31, 0x22, 0x37, 0x36, 0x96, 0xFA, 0xBC, 0x0F, 0x08, 0x52, 0x1D, 0x55, 0x1A, 0xC5,
0x4E, 0x23, 0x69, 0x7A, 0x92, 0xFF, 0x5B, 0x5A, 0xEB, 0x9A, 0x1C, 0xA9, 0xD1, 0x7E, 0x0D, 0xFC, 0x50, 0x8A, 0xB6, 0x62,
0xF5, 0x0A, 0xF8, 0xDC, 0x03, 0x3C, 0x0C, 0x39, 0xF1, 0xB8, 0xF3, 0x3D, 0xF2, 0xD5, 0x97, 0x66, 0x81, 0x32, 0xA0, 0x00,
0x06, 0xCE, 0xF6, 0xEA, 0xB7, 0x17, 0xF7, 0x8C, 0x79, 0xD6, 0xA7, 0xBF, 0x8B, 0x3F, 0x1F, 0x53, 0x63, 0x75, 0x35, 0x2C,
0x60, 0xFD, 0x27, 0xD3, 0x94, 0xA5, 0x7C, 0xA1, 0x05, 0x58, 0x2D, 0xBD, 0xD9, 0xC7, 0xAF, 0x6B, 0x54, 0x0B, 0xE0, 0x38,
0x04, 0xC8, 0x9D, 0xE7, 0x14, 0xB1, 0x87, 0x9C, 0xDF, 0x6F, 0xF9, 0xDA, 0x2A, 0xC4, 0x59, 0x16, 0x74, 0x91, 0xAB, 0x26,
0x61, 0x76, 0x34, 0x2B, 0xAD, 0x99, 0xFB, 0x72, 0xEC, 0x33, 0x12, 0xDE, 0x98, 0x3B, 0xC0, 0x9B, 0x3E, 0x18, 0x10, 0x3A,
0x56, 0xE1, 0x77, 0xC9, 0x1E, 0x9E, 0x95, 0xA3, 0x90, 0x19, 0xA8, 0x6C, 0x09, 0xD0, 0xF0, 0x86};
+1 -1
View File
@@ -52,7 +52,7 @@ extern uint16_t NB_UE_INST;
static uicc_t** uiccArray=NULL;
const char *hexTable="0123456789abcdef";
const char *const hexTable = "0123456789abcdef";
static inline uint8_t mkDigit(unsigned char in) {
for (int i=0; i<16; i++)
if (tolower(in)==hexTable[i])