Commit 514adc75 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Merge remote-tracking branch 'origin/develop' into develop-SRS-feedback

# Conflicts:
#	nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
#	openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
parents ae7a2f58 cb3108f4
......@@ -579,9 +579,17 @@ class Containerize():
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
lSsh.command('docker save ' + self.imageToCopy + ':' + imageTag + ' | gzip --fast > ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
ret = lSsh.copyin(lIpAddr, lUserName, lPassWord, '~/' + self.imageToCopy + '-' + imageTag + '.tar.gz', '.')
if ret != 0:
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not created by docker save', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close()
# Going to the Test Server
......@@ -599,15 +607,26 @@ class Containerize():
lPassWord = self.eNB2Password
lSsh.open(lIpAddr, lUserName, lPassWord)
lSsh.copyout(lIpAddr, lUserName, lPassWord, './' + self.imageToCopy + '-' + imageTag + '.tar.gz', '~')
# copyout has no return code and will quit if something fails
lSsh.command('docker rmi ' + self.imageToCopy + ':' + imageTag, '\$', 10)
lSsh.command('docker load < ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('o such file') or lSsh.getBefore().count('invalid tar header'):
logging.debug(lSsh.getBefore())
HTML.CreateHtmlTestRow('problem during docker load', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.command('rm ' + self.imageToCopy + '-' + imageTag + '.tar.gz', '\$', 60)
if lSsh.getBefore().count('cannot remove'):
HTML.CreateHtmlTestRow('file not copied during scp?', 'KO', CONST.ALL_PROCESSES_OK)
self.exitStatus = 1
return False
lSsh.close()
if os.path.isfile('./' + self.imageToCopy + '-' + imageTag + '.tar.gz'):
os.remove('./' + self.imageToCopy + '-' + imageTag + '.tar.gz')
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
def DeployObject(self, HTML, EPC):
if self.eNB_serverId[self.eNB_instance] == '0':
......@@ -683,6 +702,9 @@ class Containerize():
logging.debug(' -- ' + str(unhealthyNb) + ' unhealthy container(s)')
logging.debug(' -- ' + str(startingNb) + ' still starting container(s)')
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
status = False
if healthyNb == 1:
cnt = 0
......@@ -697,11 +719,12 @@ class Containerize():
status = True
logging.info('\u001B[1m Deploying OAI object Pass\u001B[0m')
time.sleep(10)
else:
# containers are unhealthy, so we won't start. However, logs are stored at the end
# in UndeployObject so we here store the logs of the unhealthy container to report it
mySSH.command('docker logs ' + containerName + ' > ' + lSourcePath + '/cmake_targets/' + self.eNB_logFile[self.eNB_instance], '\$', 30)
mySSH.close()
self.testCase_id = HTML.testCase_id
self.eNB_logFile[self.eNB_instance] = 'enb_' + self.testCase_id + '.log'
if status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
else:
......
......@@ -141,7 +141,7 @@ class PhySim:
logging.debug('oai-physim size is unknown')
# logging to OC Cluster and then switch to corresponding project
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 30)
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword} --server https://api.oai.cs.eurecom.fr:6443', '\$', 30)
if mySSH.getBefore().count('Login successful.') == 0:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
mySSH.close()
......
......@@ -253,7 +253,7 @@ class EPCManagement():
logging.debug('Starting OAI CN5G')
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60)
if re.search('start-mini-as-ue', self.cfgDeploy):
dFile = 'docker-compose-mini-nrf-asue.yaml'
......@@ -537,7 +537,7 @@ class EPCManagement():
mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5)
logging.debug('Terminating OAI CN5G')
mySSH.command('cd /opt/oai-cn5g-fed-v1.3/docker-compose', '\$', 5)
mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5)
mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60)
mySSH.command('docker volume prune --force || true', '\$', 60)
time.sleep(2)
......
......@@ -921,7 +921,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif action == 'Build_Proxy':
CONTAINERS.BuildProxy(HTML)
elif action == 'Copy_Image_to_Test':
CONTAINERS.Copy_Image_to_Test_Server(HTML)
success = CONTAINERS.Copy_Image_to_Test_Server(HTML)
if not success:
RAN.prematureExit = True
elif action == 'Deploy_Object':
CONTAINERS.DeployObject(HTML, EPC)
if CONTAINERS.exitStatus==1:
......
......@@ -2,7 +2,7 @@ version: '3.8'
services:
oai-nrf:
container_name: "l2sim-oai-nrf"
image: oai-nrf:latest
image: oai-nrf:august-dev
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
......@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "l2sim-oai-amf"
image: oai-amf:latest
image: oai-amf:august-dev
environment:
- TZ=Europe/paris
- INSTANCE=0
......@@ -110,7 +110,7 @@ services:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "l2sim-oai-smf"
image: oai-smf:latest
image: oai-smf:august-dev
environment:
- TZ=Europe/Paris
- INSTANCE=0
......@@ -156,7 +156,7 @@ services:
ipv4_address: 192.168.71.133
oai-spgwu:
container_name: "l2sim-oai-spgwu"
image: oai-spgwu-tiny:latest
image: oai-spgwu-tiny:august-dev
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
......
......@@ -2,7 +2,7 @@ version: '3.8'
services:
oai-nrf:
container_name: "rfsim5g-oai-nrf"
image: oai-nrf:latest
image: oai-nrf:august-dev
environment:
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
......@@ -42,7 +42,7 @@ services:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "rfsim5g-oai-amf"
image: oai-amf:latest
image: oai-amf:august-dev
environment:
- TZ=Europe/paris
- INSTANCE=0
......@@ -110,7 +110,7 @@ services:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "rfsim5g-oai-smf"
image: oai-smf:latest
image: oai-smf:august-dev
environment:
- TZ=Europe/Paris
- INSTANCE=0
......@@ -156,7 +156,7 @@ services:
ipv4_address: 192.168.71.133
oai-spgwu:
container_name: "rfsim5g-oai-spgwu"
image: oai-spgwu-tiny:latest
image: oai-spgwu-tiny:august-dev
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
......
......@@ -237,8 +237,9 @@ compilations() {
echo_error "$2 compilation failed"
exit 1
fi
if [ -s $3 ] ; then
cp $3 $4
if [ -s "$3" ] ; then
rm -f "$4"
ln -s "$PWD/$3" "$4"
echo_success "$2 compiled"
check_warnings "$dlog/$2.$REL.txt"
else
......
......@@ -43,6 +43,7 @@ RUN yum update -y && \
tzdata \
procps-ng \
atlas \
gdb \
python3 \
python3-pip \
net-tools \
......
......@@ -53,6 +53,7 @@ RUN apt-get update && \
iputils-ping \
iproute2 \
iperf \
gdb \
python \
python3 \
python3-six \
......
......@@ -46,6 +46,7 @@ RUN yum repolist --disablerepo=* && \
lksctp-tools \
nettle \
tzdata \
gdb \
python3 \
python3-pip \
net-tools \
......
......@@ -52,6 +52,7 @@ RUN apt-get update && \
net-tools \
iproute2 \
iputils-ping \
gdb \
python \
python3 \
python3-six \
......
......@@ -41,6 +41,7 @@ RUN yum update -y && \
tzdata \
procps-ng \
atlas \
gdb \
python3 \
python3-pip \
net-tools \
......
......@@ -47,6 +47,7 @@ RUN apt-get update && \
libatlas3-base \
libconfig9 \
net-tools \
gdb \
python \
python3 \
python3-six \
......
......@@ -44,6 +44,7 @@ RUN yum update -y && \
nettle \
tzdata \
atlas \
gdb \
python3 \
python3-pip \
iproute \
......
......@@ -46,6 +46,7 @@ RUN yum update -y && \
iputils \
iproute \
atlas \
gdb \
python3 \
python3-pip \
libXpm \
......
......@@ -50,6 +50,7 @@ RUN apt-get update && \
libconfig9 \
openssl \
net-tools \
gdb \
python \
python3 \
python3-six \
......
......@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
......@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx
fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "=================================="
echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
......@@ -51,9 +51,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
......@@ -62,6 +68,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx
fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "=================================="
echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
......@@ -31,9 +31,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
......@@ -42,6 +48,9 @@ elif [[ -v USE_N3XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t n3xx
fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "=================================="
echo "== Starting eNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
......@@ -30,6 +30,10 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done
#now generate USIM files
......@@ -38,6 +42,8 @@ cd $PREFIX
$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
......@@ -57,6 +63,9 @@ if [[ -v USE_NFAPI ]]; then
new_args+=("$PREFIX/etc/ue.conf")
fi
# enable printing of stack traces on assert
export gdbStacks=1
echo "=================================="
echo "== Starting LTE UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
......@@ -40,9 +40,15 @@ for c in ${CONFIG_FILES}; do
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
echo "=================================="
echo "== Configuration file: ${c}"
cat ${c}
done
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
if [[ -v USE_B2XX ]]; then
$PREFIX/bin/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
......@@ -58,6 +64,9 @@ while [[ $# -gt 0 ]]; do
shift
done
# enable printing of stack traces on assert
export gdbStacks=1
echo "=================================="
echo "== Starting NR UE soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
......
......@@ -1311,30 +1311,30 @@ typedef struct {
} nfapi_v4_srs_parameters_t;
typedef struct {
uint16_t rnti; // UE RNTI, Value: 1->65535
uint32_t handle; // An opaque handling returned in the SRS.indication
uint16_t bwp_size; // Bandwidth part size [3GPP TS 38.213, sec 12]. Number of contiguous PRBs allocated to the BWP, Value: 1->275
uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
uint8_t num_ant_ports; // Number of antenna ports N_SRS_ap [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 port, 1 = 2 ports, 2 = 4 ports
uint8_t num_symbols; // Number of symbols N_SRS_symb [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols
uint8_t num_repetitions; // Repetition factor R [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 = 1, 1 = 2, 2 = 4
uint8_t time_start_position; // Starting position in the time domain l_0 [3GPP TS 38.211, Sec 6.4.1.4.1], Note: the MAC undertakes the translation from startPosition to l_0, Value: 0 --> 13
uint8_t config_index; // SRS bandwidth config index C_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 63
uint16_t sequence_id; // SRS sequence ID n_SRS_ID [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 1023
uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
uint8_t comb_size; // Transmission comb size K_TC [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 = comb size 2, 1 = comb size 4, 2 = comb size 8 (Rel16)
uint8_t comb_offset; // Transmission comb offset K'_TC[3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 1 (combSize = 0), Value: 0 --> 3 (combSize = 1), Value: 0 --> 7 (combSize = 2)
uint8_t cyclic_shift; // Cyclic shift n_CS_SRS [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 7 (combSize = 0), Value: 0 --> 11 (combSize = 1), Value: 0 --> 5 (combSize = 2)
uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
uint8_t group_or_sequence_hopping; // Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRSResource IE), Value: 0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping
uint8_t resource_type; // Type of SRS resource allocation [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0: aperiodic, 1: semi-persistent, 2: periodic
uint16_t t_srs; // SRS-Periodicity in slots [3GPP TS 38.211, Sec 6.4.1.4.4], Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
nfapi_nr_ul_beamforming_t beamforming;
uint16_t rnti; // UE RNTI, Value: 1->65535
uint32_t handle; // An opaque handling returned in the SRS.indication
uint16_t bwp_size; // Bandwidth part size [3GPP TS 38.213, sec 12]. Number of contiguous PRBs allocated to the BWP, Value: 1->275
uint16_t bwp_start; // Bandwidth part start RB index from reference CRB [3GPP TS 38.213, sec 12], Value: 0->274
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
uint8_t num_ant_ports; // Number of antenna ports N_SRS_ap [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 port, 1 = 2 ports, 2 = 4 ports
uint8_t num_symbols; // Number of symbols N_SRS_symb [3GPP TS 38.211, Sec 6.4.1.4.1], Value: 0 = 1 symbol, 1 = 2 symbols, 2 = 4 symbols
uint8_t num_repetitions; // Repetition factor R [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 = 1, 1 = 2, 2 = 4
uint8_t time_start_position; // Starting position in the time domain l_0 [3GPP TS 38.211, Sec 6.4.1.4.1], Note: the MAC undertakes the translation from startPosition to l_0, Value: 0 --> 13
uint8_t config_index; // SRS bandwidth config index C_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 63
uint16_t sequence_id; // SRS sequence ID n_SRS_ID [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 1023
uint8_t bandwidth_index; // SRS bandwidth index B_SRS [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
uint8_t comb_size; // Transmission comb size K_TC [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 = comb size 2, 1 = comb size 4, 2 = comb size 8 (Rel16)
uint8_t comb_offset; // Transmission comb offset K'_TC[3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 1 (combSize = 0), Value: 0 --> 3 (combSize = 1), Value: 0 --> 7 (combSize = 2)
uint8_t cyclic_shift; // Cyclic shift n_CS_SRS [3GPP TS 38.211, Sec 6.4.1.4.2], Value: 0 --> 7 (combSize = 0), Value: 0 --> 11 (combSize = 1), Value: 0 --> 5 (combSize = 2)
uint8_t frequency_position; // Frequency domain position n_RRC [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 67
uint16_t frequency_shift; // Frequency domain shift n_shift [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 268
uint8_t frequency_hopping; // Frequency hopping b_hop [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0 --> 3
uint8_t group_or_sequence_hopping; // Group or sequence hopping configuration (RRC parameter groupOrSequenceHopping in SRSResource IE), Value: 0 = No hopping, 1 = Group hopping groupOrSequenceHopping, 2 = Sequence hopping
uint8_t resource_type; // Type of SRS resource allocation [3GPP TS 38.211, Sec 6.4.1.4.3], Value: 0: aperiodic, 1: semi-persistent, 2: periodic
uint16_t t_srs; // SRS-Periodicity in slots [3GPP TS 38.211, Sec 6.4.1.4.4], Value: 1,2,3,4,5,8,10,16,20,32,40,64,80,160,320,640,1280,2560
uint16_t t_offset; // Slot offset value [3GPP TS 38.211, Sec 6.4.1.4.3], Value:0->2559
nfapi_nr_ul_beamforming_t beamforming;
nfapi_v4_srs_parameters_t srs_parameters_v4;
} nfapi_nr_srs_pdu_t;
......
......@@ -998,7 +998,12 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
int16_t ls_estimated[2];
uint8_t mem_offset = ((16 - ((long)&srs_estimated_channel_freq[0][0][subcarrier_offset + nr_srs_info->k_0_p[0][0]])) & 0xF) >> 2; // >> 2 <=> /sizeof(int32_t)
int32_t srs_est[frame_parms->ofdm_symbol_size*(1<<srs_pdu->num_symbols) + mem_offset] __attribute__ ((aligned(32)));
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
// The End of OFDM symbol corresponds to the position of last 16384 in the filter
// The multadd_real_vector_complex_scalar applies the remaining 8 zeros of filter, therefore, to avoid a buffer overflow,
// we added 8 in the array size
int32_t srs_est[frame_parms->ofdm_symbol_size*(1<<srs_pdu->num_symbols) + mem_offset + 8] __attribute__ ((aligned(32)));
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
......@@ -1242,8 +1247,8 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
} // for (int rb = 0; rb < m_SRS_b; rb++)
uint32_t noise_power = calc_power(noise_real,frame_parms->nb_antennas_rx*N_ap*M_sc_b_SRS)
+ calc_power(noise_imag,frame_parms->nb_antennas_rx*N_ap*M_sc_b_SRS);
uint32_t noise_power = max(calc_power(noise_real,frame_parms->nb_antennas_rx*N_ap*M_sc_b_SRS)
+ calc_power(noise_imag,frame_parms->nb_antennas_rx*N_ap*M_sc_b_SRS), 1);
*snr = dB_fixed((int32_t)((signal_power<<factor_bits)/(noise_power))) - factor_dB;
......
......@@ -85,38 +85,30 @@ void multadd_real_vector_complex_scalar(int16_t *x,
uint32_t i;
// do 8 multiplications at a time
simd_q15_t alpha_r_128,alpha_i_128,yr,yi,*x_128=(simd_q15_t*)x,*y_128=(simd_q15_t*)y;
int j;
simd_q15_t alpha_r_128, alpha_i_128, yr, yi, *x_128 = (simd_q15_t *)x, *y_128 = (simd_q15_t *)y;
// printf("alpha = %d,%d\n",alpha[0],alpha[1]);
alpha_r_128 = set1_int16(alpha[0]);
alpha_i_128 = set1_int16(alpha[1]);
j=0;
for (i=0; i<N>>3; i++) {
yr = mulhi_s1_int16(alpha_r_128,x_128[i]);
yi = mulhi_s1_int16(alpha_i_128,x_128[i]);
#if defined(__x86_64__) || defined(__i386__)
y_128[j] = _mm_adds_epi16(y_128[j],_mm_unpacklo_epi16(yr,yi));
j++;
y_128[j] = _mm_adds_epi16(y_128[j],_mm_unpackhi_epi16(yr,yi));
j++;
const simd_q15_t tmp = _mm_loadu_si128(y_128);
_mm_storeu_si128(y_128++, _mm_adds_epi16(tmp, _mm_unpacklo_epi16(yr, yi)));
const simd_q15_t tmp2 = _mm_loadu_si128(y_128);
_mm_storeu_si128(y_128++, _mm_adds_epi16(tmp2, _mm_unpackhi_epi16(yr, yi)));
#elif defined(__arm__)
int16x8x2_t yint;
yint = vzipq_s16(yr,yi);
y_128[j] = adds_int16(y_128[j],yint.val[0]);
*y_128 = adds_int16(*y_128, yint.val[0]);
j++;
y_128[j] = adds_int16(y_128[j],yint.val[1]);
*y_128 = adds_int16(*y_128, yint.val[1]);
j++;
#endif
}
_mm_empty();
_m_empty();
}
void multadd_real_four_symbols_vector_complex_scalar(int16_t *x,
......
......@@ -1260,8 +1260,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
pucch_pdu->format_type = default_pucch_fmt[rsetindex];
pucch_pdu->initial_cyclic_shift = r_pucch%default_pucch_csset[rsetindex];
if (rsetindex==3||rsetindex==7||rsetindex==11) pucch_pdu->initial_cyclic_shift*=6;
else if (rsetindex==1||rsetindex==2) pucch_pdu->initial_cyclic_shift*=3;
else pucch_pdu->initial_cyclic_shift*=4;
else if (rsetindex==1||rsetindex==2) pucch_pdu->initial_cyclic_shift*=4;
else pucch_pdu->initial_cyclic_shift*=3;
pucch_pdu->nr_of_symbols = nr_of_symb;
pucch_pdu->start_symbol_index = start_symb;
if (pucch_pdu->format_type == 1) pucch_pdu->time_domain_occ_idx = 0; // check this!!
......
......@@ -28,7 +28,6 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 2;
do_CSIRS = 1;
do_SRS = 1;
......@@ -283,8 +282,8 @@ RUs = (
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 6;
att_rx = 6;
att_tx = 12;
att_rx = 12;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
......
......@@ -27,15 +27,14 @@ gNBs =
////////// Physical parameters:
pdsch_AntennaPorts_XP = 1;
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 0;
ul_prbblacklist = "79,80,81,82"
do_CSIRS = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 10;
searchSpaceZero = 0;
}
);
......@@ -67,7 +66,7 @@ gNBs =
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 10;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
......@@ -203,9 +202,11 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pusch_TargetSNRx10 = 300;
pucch_TargetSNRx10 = 200;
pusch_FailureThres = 1000;
ulsch_max_frame_inactivity = 0;
ul_max_mcs = 28;
}
);
......
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