mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-21 00:20:30 +00:00
Compare commits
3 Commits
sl-eurecom
...
nr_dlsch_p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e8dd7aef5 | ||
|
|
367ec43aea | ||
|
|
c924f8c234 |
@@ -22,7 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <platform_types.h>
|
||||
//#include <platform_types.h>
|
||||
|
||||
#if defined(ENB_MODE)
|
||||
# define display_backtrace()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
all: measurement_display thread-pool-test
|
||||
|
||||
measurement_display: measurement_display.c thread-pool.h
|
||||
gcc measurement_display.c -I ${OPENAIR_DIR}/ -I ${OPENAIR_DIR}/common/utils/ -I. ${OPENAIR_DIR}/common/utils/backtrace.c -lpthread -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o measurement_display
|
||||
gcc measurement_display.c -I ${OPENAIR_DIR}/ -I${OPENAIR_DIR}/openair1 -I ${OPENAIR_DIR}/targets/ARCH/COMMON -I ${OPENAIR_DIR}/common/utils/ -I. ${OPENAIR_DIR}/common/utils/backtrace.c -lpthread -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o measurement_display
|
||||
|
||||
thread-pool-test: thread-pool.c thread-pool.h
|
||||
gcc -g thread-pool.c -I ${OPENAIR_DIR}/ -I ${OPENAIR_DIR}/common/utils/ -I. ${OPENAIR_DIR}/common/utils/backtrace.c -I ${OPENAIR_DIR}/openair2/COMMON ${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/config/config_userapi.c ${OPENAIR_DIR}/common/config/config_load_configmodule.c ${OPENAIR_DIR}/common/config/config_cmdline.c -lpthread -ldl -D TEST_THREAD_POOL -I../LOG -I../../utils/T -o thread-pool-test
|
||||
|
||||
@@ -28,6 +28,7 @@ int main(int argc, char *argv[]) {
|
||||
usleep(100000);
|
||||
cpuCyclesMicroSec=(rdtsc()-deb)/100000;
|
||||
printf("Cycles per µs: %lu\n",cpuCyclesMicroSec);
|
||||
printf("All measurements are in µs!\n");
|
||||
printf("Key" SEP "delay to process" SEP "processing time" SEP "delay to be read answer\n");
|
||||
notifiedFIFO_elt_t doneRequest;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ A performance measurement is integrated: the pool will automacillay fill timesta
|
||||
* endProcessingTime: time the worker finished the job
|
||||
* returnTime: time the client reads the result
|
||||
|
||||
if you set the environement variable: thread-pool-measurements to a valid file name
|
||||
if you set the environement variable: threadPoolMeasurements to a valid file name
|
||||
These measurements will be wrote to this Linux pipe.
|
||||
|
||||
A tool to read the linux fifo and display it in ascii is provided: see the local directory Makefile for this tool and to compile the thread pool unitary tests.
|
||||
|
||||
@@ -680,6 +680,7 @@ void *UE_thread(void *arg) {
|
||||
rxp,
|
||||
readBlockSize,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
/*
|
||||
AssertFatal( writeBlockSize ==
|
||||
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||
timestamp+
|
||||
@@ -690,6 +691,7 @@ void *UE_thread(void *arg) {
|
||||
writeBlockSize,
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
1),"");
|
||||
*/
|
||||
|
||||
if( slot_nr==(nb_slot_frame-1)) {
|
||||
// read in first symbol of next frame and adjust for timing drift
|
||||
|
||||
@@ -241,9 +241,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint16_t nb_rb = 30;
|
||||
double Coderate = 0.0;
|
||||
//nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
|
||||
//uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
|
||||
uint8_t nb_re_dmrs = 6; //(dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4;
|
||||
uint16_t length_dmrs = 1; //cfg->pdsch_config.dmrs_max_length.value;
|
||||
pdsch_dmrs_type_t dmrs_type = phy_vars_ue->dmrs_DownlinkConfig.pdsch_dmrs_type; //check if this is configured properly
|
||||
uint8_t nb_re_dmrs = (dmrs_type==pdsch_dmrs_type1)?6:4;
|
||||
uint16_t length_dmrs = (uint16_t) phy_vars_ue->dmrs_DownlinkConfig.pdsch_maxLength;
|
||||
|
||||
uint32_t i,j;
|
||||
|
||||
@@ -715,10 +715,10 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint32_t Tbslbrm = 950984;
|
||||
uint16_t nb_rb = 30;
|
||||
double Coderate = 0.0;
|
||||
nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
|
||||
uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
|
||||
uint8_t nb_re_dmrs = (dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4;
|
||||
uint16_t length_dmrs = 1; //cfg->pdsch_config.dmrs_max_length.value;
|
||||
//fapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
|
||||
pdsch_dmrs_type_t dmrs_type = phy_vars_ue->dmrs_DownlinkConfig.pdsch_dmrs_type; //check if this is configured properly
|
||||
uint8_t nb_re_dmrs = (dmrs_type==pdsch_dmrs_type1)?6:4;
|
||||
uint16_t length_dmrs = (uint16_t) phy_vars_ue->dmrs_DownlinkConfig.pdsch_maxLength;
|
||||
|
||||
uint32_t i,j;
|
||||
|
||||
@@ -1240,7 +1240,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
#endif
|
||||
|
||||
#ifdef UE_DLSCH_PARALLELISATION
|
||||
void *nr_dlsch_decoding_process(void *arg)
|
||||
void nr_dlsch_decoding_process(void *arg)
|
||||
{
|
||||
nr_rxtx_thread_data_t *rxtxD= (nr_rxtx_thread_data_t *)arg;
|
||||
UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
@@ -1258,7 +1258,7 @@ void *nr_dlsch_decoding_process(void *arg)
|
||||
int8_t l [68*384];
|
||||
//__m128i l;
|
||||
int16_t inv_d [68*384];
|
||||
int16_t *p_invd =&inv_d;
|
||||
int16_t *p_invd = inv_d;
|
||||
uint8_t kb, kc;
|
||||
uint8_t Ilbrm = 0;
|
||||
uint32_t Tbslbrm = 950984;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6
|
||||
//#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size
|
||||
//#define UE_SLOT_PARALLELISATION
|
||||
//#define UE_DLSCH_PARALLELISATION
|
||||
#define UE_DLSCH_PARALLELISATION
|
||||
|
||||
/*enum openair_SCHED_STATUS {
|
||||
openair_SCHED_STOPPED=1,
|
||||
|
||||
@@ -420,7 +420,6 @@ typedef int(*oai_transport_initfunc_t)(openair0_device *device, openair0_config_
|
||||
|
||||
#define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size)
|
||||
|
||||
#define sample_t struct complex16 // 2*16 bits complex number
|
||||
|
||||
typedef struct {
|
||||
uint64_t magic; // Magic value (see defines above)
|
||||
@@ -446,7 +445,6 @@ typedef struct {
|
||||
|
||||
#define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size)
|
||||
|
||||
#define sample_t struct complex16 // 2*16 bits complex number
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
||||
@@ -45,6 +45,8 @@ extern RAN_CONTEXT_t RC;
|
||||
|
||||
pthread_mutex_t Sockmutex;
|
||||
|
||||
typedef struct complex16 sample_t; // 2*16 bits complex number
|
||||
|
||||
typedef struct buffer_s {
|
||||
int conn_sock;
|
||||
openair0_timestamp lastReceivedTS;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <common/utils/simple_executable.h>
|
||||
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
void fullwrite(int fd, void *_buf, int count) {
|
||||
char *buf = _buf;
|
||||
@@ -123,7 +124,7 @@ int main(int argc, char *argv[]) {
|
||||
setblocking(serviceSock, blocking);
|
||||
AssertFatal(read(fd,&header,sizeof(header)), "");
|
||||
fullwrite(serviceSock, &header, sizeof(header));
|
||||
int dataSize=sizeof(sample_t)*header.size*header.nbAnt;
|
||||
int dataSize=sizeof(int32_t)*header.size*header.nbAnt;
|
||||
|
||||
if (dataSize>bufSize) {
|
||||
void * new_buff = realloc(buff, dataSize);
|
||||
|
||||
Reference in New Issue
Block a user