Commit cbd801b6 authored by laurent's avatar laurent

some cleanup and checks

parent 9112ee01
......@@ -2439,9 +2439,9 @@ endif (${T_TRACER})
#This rule and the following deal with it.
add_custom_command (
OUTPUT ${OPENAIR_DIR}/common/utils/T/T_IDs.h
COMMAND $(MAKE) clean
COMMAND $(MAKE)
COMMAND $(MAKE) check_vcd
COMMAND make clean
COMMAND make
COMMAND make check_vcd
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_messages.txt
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
......@@ -3073,7 +3073,7 @@ function(make_driver name dir)
endforeach()
CONFIGURE_FILE(${OPENAIR_CMAKE}/tools/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild)
add_custom_command(OUTPUT ${name}.ko
COMMAND $(MAKE) -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
COMMAND make -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name}
COMMENT "building ${module}.ko"
VERBATIM
......
......@@ -408,6 +408,10 @@ function main() {
SKIP_SHARED_LIB_FLAG="True"
echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries"
shift;;
--ninja)
CMAKE_CMD="$CMAKE_CMD -GNinja"
MAKE_CMD=ninja
shift;;
-h | --help)
print_help
exit 1;;
......
......@@ -183,10 +183,14 @@ compilations() {
else
COV_SCAN_PREFIX=""
fi
if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
else
$COV_SCAN_PREFIX make -j`nproc` $2
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $2
else
if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
else
$COV_SCAN_PREFIX make -j`nproc` $2
fi
fi
} > $dlog/$2.$REL.txt 2>&1
......@@ -778,7 +782,7 @@ install_asn1c_from_source(){
install_nas_tools() {
if [ ! -f .ue.nvram0 ]; then
echo_success "generate .ue_emm.nvram .ue.nvram"
echo_success "generate .ue_emm.nvram .ue.nvram ./nvram --gen -c $1 -o $2"
./nvram --gen -c $1 -o $2
else
[ ./nvram -nt .ue.nvram0 -o ./nvram -nt .ue_emm.nvram0 ] && ./nvram --gen -c $1 -o $2
......
......@@ -486,34 +486,39 @@ void RCconfig_RU(void) {
return;
}
int rx_rf(RU_t *ru, int lastReadSz) {
RU_proc_t *proc = &ru->proc;
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
void *rxp[ru->nb_rx];
int rx_rf(RU_proc_t *proc, NR_DL_FRAME_PARMS *fp,int nb_rx, int32_t** rxdata, int lastReadSz,
openair0_device* rfdevice, openair0_timestamp ts_offset) {
void *rxp[nb_rx];
int nextSlot=(proc->tti_rx+1)%fp->slots_per_frame;
uint32_t samples_per_slot = fp->get_samples_per_slot(nextSlot,fp);
for (int i=0; i<ru->nb_rx; i++)
rxp[i] = (void *)&ru->common.rxdata[i][fp->get_samples_slot_timestamp(nextSlot,fp,0)];
int rxBufOffet=fp->get_samples_slot_timestamp(nextSlot,fp,0);
int controlrxBufOffet=(proc->timestamp_rx+lastReadSz)%fp->samples_per_frame;
AssertFatal(rxBufOffet == controlrxBufOffet &&
rxBufOffet+ samples_per_slot <= fp->samples_per_frame,
"inconsistent IQ samples read");
for (int i=0; i<nb_rx; i++)
rxp[i] = (void *)&rxdata[i][rxBufOffet];
openair0_timestamp old_ts = proc->timestamp_rx;
LOG_D(PHY,"Reading %d samples for slot %d (%p)\n",samples_per_slot,nextSlot,rxp[0]);
unsigned int rxs = ru->rfdevice.trx_read_func(&ru->rfdevice,
& proc->timestamp_rx,
unsigned int rxs = rfdevice->trx_read_func(rfdevice,
&proc->timestamp_rx,
rxp,
samples_per_slot,
ru->nb_rx);
nb_rx);
if (rxs != samples_per_slot)
LOG_E(PHY, "rx_rf: Asked for %d samples, got %d from USRP\n",samples_per_slot,rxs);
// In case we need offset, between RU or any other need
// The sync system can put a offset to use betwwen RF boards
proc->timestamp_rx+=ru->ts_offset;
proc->timestamp_rx+=ts_offset;
if (lastReadSz && proc->timestamp_rx - old_ts != lastReadSz)
LOG_D(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",
proc->timestamp_rx - old_ts - samples_per_slot,ru->ts_offset);
proc->timestamp_rx - old_ts - samples_per_slot,ts_offset);
return rxs;
}
......@@ -738,10 +743,12 @@ static void *ru_thread( void *param ) {
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
int lastReadSz=0;
sf_ahead = (uint16_t) ceil((float)6/(0x01<<fp->numerology_index));
proc->tti_rx=-1; // we increment before each read
openair0_timestamp ts_offset=0; //for multi RU
while (!oai_exit) {
// synchronization on input FH interface, acquire signals/data and block
lastReadSz=rx_rf(ru, lastReadSz);
lastReadSz=rx_rf(proc, fp, ru->nb_rx,ru->common.rxdata,lastReadSz, &ru->rfdevice, ts_offset);
// do RX front-end processing (frequency-shift, dft) if needed
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
uint32_t idx_sf = proc->timestamp_rx / fp->samples_per_subframe;
......@@ -824,7 +831,7 @@ void launch_NR_RU(char *rf_config_file) {
}
}
void init_eNB_afterRU() {
void init_eNB_afterRU(void) {
AssertFatal(false,"");
}
......
......@@ -22,7 +22,7 @@
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32];
extern unsigned short lte_cqi_eff1024[16];
extern char lte_cqi_snr_dB[15];
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern short minus_one[8];
extern short minus_one[8];
extern short *ul_ref_sigs[30][2][34];
......
......@@ -61,4 +61,5 @@ uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch, uint8_t nb_re_dmrs, uint
uint32_t nr_get_E(uint32_t G, uint8_t C, uint8_t Qm, uint8_t Nl, uint8_t r);
void init_pucch2_luts(void);
#endif
......@@ -263,7 +263,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
}
#else
int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
const int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
int16_t xr[24] __attribute__((aligned(32)));
int16_t xrt[24] __attribute__((aligned(32)));
int32_t xrtmag=0;
......
......@@ -38,6 +38,7 @@
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
......
......@@ -38,7 +38,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
extern unsigned int DAQ_MBOX;
extern int number_of_cards;
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern RAN_CONTEXT_t RC;
......@@ -73,8 +73,8 @@ extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
......@@ -82,23 +82,22 @@ extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
......
......@@ -34,7 +34,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
//#include "PHY/LTE_TRANSPORT/transport_extern.h"
extern short conjugate[8],conjugate2[8];
extern const short conjugate[8],conjugate2[8];
extern int number_of_cards;
......@@ -70,8 +70,8 @@ extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
......@@ -79,23 +79,19 @@ extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
......
......@@ -36,9 +36,6 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
extern int number_of_cards;
extern short conjugate[8],conjugate2[8];
extern PHY_VARS_UE ***PHY_vars_UE_g;
extern short primary_synch0[144];
......@@ -70,8 +67,8 @@ extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern double sinr_to_cqi[4][16];
extern int cqi_to_mcs[16];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
......@@ -79,23 +76,23 @@ extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern double beta1_dlsch_MI[6][MCS_COUNT];
extern double beta2_dlsch_MI[6][MCS_COUNT];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern double q_qpsk[8];
extern double q_qam16[8];
extern double q_qam64[8];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern double p_qpsk[8];
extern double p_qam16[8];
extern double p_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -60,7 +60,7 @@ extern uint16_t NB_THREAD_INST;
extern unsigned char NB_RN_INST;
extern unsigned short NODE_ID[1];
extern int cqi_to_mcs[16];
extern const int cqi_to_mcs[16];
extern uint32_t RRC_CONNECTION_FLAG;
......
......@@ -36,6 +36,7 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include <openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h>
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
......
......@@ -45,7 +45,7 @@ extern const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
extern UE_RRC_INST *UE_rrc_inst;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
extern int cqi_to_mcs[16];
extern const int cqi_to_mcs[16];
extern uint32_t RRC_CONNECTION_FLAG;
extern uint8_t rb_table[34];
extern mac_rlc_am_muilist_t rlc_am_mui;
......
......@@ -43,7 +43,7 @@ void gen_network_record_from_conf(const plmn_conf_param_t *conf, network_record_
strcpy(record->fullname, conf->fullname);
strcpy(record->shortname, conf->shortname);
char num[6];
char num[60];
sprintf(num, "%s%s", conf->mcc, conf->mnc);
record->num = atoi(num);
......
......@@ -660,6 +660,7 @@ int main ( int argc, char **argv )
initTpool("n", L1proc->threadPool, true);
initNotifiedFIFO(L1proc->respEncode);
initNotifiedFIFO(L1proc->respDecode);
RC.eNB[x][CC_id]->proc.L1_proc_tx.threadPool=L1proc->threadPool;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment