nr_transport_common_proto.h 2.67 KB
Newer Older
1

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

23 24
/*! \file PHY/NR_TRANSPORT/nr_transport_common_proto.h
* \brief Some support routines
25
* \author
26
* \date 2019
27 28 29 30 31 32 33
* \version 0.1
* \company Eurecom
* \email:
* \note
* \warning
*/

34 35 36 37
/** @addtogroup _PHY_TRANSPORT_
 * @{
 */

38 39 40
#ifndef __NR_TRANSPORT_COMMON_PROTO__H__
#define __NR_TRANSPORT_COMMON_PROTO__H__

41
#include "PHY/defs_nr_common.h"
Hongzhi Wang's avatar
Hongzhi Wang committed
42

43

Francesco Mani's avatar
Francesco Mani committed
44 45 46
void nr_group_sequence_hopping(pucch_GroupHopping_t PUCCH_GroupHopping,
                               uint32_t n_id,
                               uint8_t n_hop,
47
                               int nr_slot_tx,
Francesco Mani's avatar
Francesco Mani committed
48 49
                               uint8_t *u,
                               uint8_t *v);
50

Francesco Mani's avatar
Francesco Mani committed
51 52 53 54 55
double nr_cyclic_shift_hopping(uint32_t n_id,
                               uint8_t m0,
                               uint8_t mcs,
                               uint8_t lnormal,
                               uint8_t lprime,
56
                               int nr_slot_tx);
Hongzhi Wang's avatar
Hongzhi Wang committed
57

58 59
/** \brief Computes available bits G. */
uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch, uint8_t nb_re_dmrs, uint16_t length_dmrs, uint8_t Qm, uint8_t Nl);
60

61
uint32_t nr_get_E(uint32_t G, uint8_t C, uint8_t Qm, uint8_t Nl, uint8_t r);
62

63
uint8_t nr_get_Qm_ul(uint8_t Imcs, uint8_t table_idx);
64

65
uint8_t nr_get_Qm_dl(uint8_t Imcs, uint8_t table_idx);
66

67
uint32_t nr_get_code_rate_ul(uint8_t Imcs, uint8_t table_idx);
Raymond Knopp's avatar
Raymond Knopp committed
68

69
uint32_t nr_get_code_rate_dl(uint8_t Imcs, uint8_t table_idx);
70

71 72 73 74
void compute_nr_prach_seq(uint8_t short_sequence,
                          uint8_t num_sequences,
                          uint8_t rootSequenceIndex,
                          uint32_t X_u[64][839]);
75

76 77 78
void init_nr_prach_tables(int N_ZC);

/**@}*/
79

laurent's avatar
laurent committed
80
void init_pucch2_luts(void);
81
#endif