Commit 4bfbb6f1 authored by Remi Hardy's avatar Remi Hardy

integration_2021_wk30

MR !1206 : nr_ue_remove_high_speed_flag
This flag is always set to 1, 
With multiple DMRS symbols configuration, very recent DMRS containing symbol shall be for channel estimation.

MR !1205 : fix-lte-ue-modem-in-docker-container
We bind the socket to any_addr (instead of localhost), so the commands to the UE can come also from a remote machine

MR !1178 : NR_CSIRS_tomerge
Implementation of CSI RS transmission at gNB

MR !1211 : develop-NSA_SA_fixes
Small fixes for NSA and SA
parents d7839d8a c93a9497
...@@ -24,10 +24,6 @@ gNBs = ...@@ -24,10 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
#pusch_TargetSNRx10 = 200;
#pucch_TargetSNRx10 = 200;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -235,6 +231,8 @@ MACRLCs = ( ...@@ -235,6 +231,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 0; ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -231,6 +229,8 @@ MACRLCs = ( ...@@ -231,6 +229,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 1; ulsch_max_slots_inactivity = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -230,6 +230,8 @@ MACRLCs = ( ...@@ -230,6 +230,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100; ulsch_max_slots_inactivity = 100;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -23,9 +23,6 @@ gNBs = ...@@ -23,9 +23,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -228,6 +225,8 @@ MACRLCs = ( ...@@ -228,6 +225,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -23,9 +23,6 @@ gNBs = ...@@ -23,9 +23,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -235,6 +232,8 @@ MACRLCs = ( ...@@ -235,6 +232,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
version: '3.8'
services:
cassandra:
image: cassandra:2.1
container_name: rfsim4g-cassandra
networks:
private_net:
ipv4_address: 192.168.68.2
environment:
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
healthcheck:
test: /bin/bash -c "nodetool status"
interval: 10s
timeout: 5s
retries: 5
db_init:
image: cassandra:2.1
container_name: rfsim4g-db-init
depends_on: [cassandra]
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
networks:
private_net:
ipv4_address: 192.168.68.4
volumes:
- ./oai_db.cql:/home/oai_db.cql
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
oai_hss:
image: oai-hss:develop-2021-06-14
container_name: rfsim4g-oai-hss
privileged: true
depends_on: [cassandra]
networks:
private_net:
ipv4_address: 192.168.68.3
public_net:
ipv4_address: 192.168.61.2
environment:
REALM: openairinterface.org
HSS_FQDN: hss.openairinterface.org
PREFIX: /openair-hss/etc
cassandra_Server_IP: 192.168.68.2
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
LTE_K: fec86ba6eb707ed08905757b1bb44b8f
APN1: oai.ipv4
APN2: internet
FIRST_IMSI: 208960100000001
NB_USERS: 10
healthcheck:
test: /bin/bash -c "pgrep oai_hss"
interval: 10s
timeout: 5s
retries: 5
oai_mme:
image: oai-mme:production
container_name: rfsim4g-oai-mme
privileged: true
depends_on: [oai_hss]
networks:
public_net:
ipv4_address: 192.168.61.3
environment:
REALM: openairinterface.org
PREFIX: /openair-mme/etc
INSTANCE: 1
PID_DIRECTORY: /var/run
HSS_IP_ADDR: 192.168.61.2
HSS_HOSTNAME: hss
HSS_FQDN: hss.openairinterface.org
HSS_REALM: openairinterface.org
MCC: '208'
MNC: '96'
MME_GID: 32768
MME_CODE: 3
TAC_0: 1
TAC_1: 2
TAC_2: 3
MME_FQDN: mme.openairinterface.org
MME_S6A_IP_ADDR: 192.168.61.3
MME_INTERFACE_NAME_FOR_S1_MME: eth0
MME_IPV4_ADDRESS_FOR_S1_MME: 192.168.61.3
MME_INTERFACE_NAME_FOR_S11: eth0
MME_IPV4_ADDRESS_FOR_S11: 192.168.61.3
MME_INTERFACE_NAME_FOR_S10: lo
MME_IPV4_ADDRESS_FOR_S10: 127.0.0.10
OUTPUT: CONSOLE
SGW_IPV4_ADDRESS_FOR_S11_0: 192.168.61.4
PEER_MME_IPV4_ADDRESS_FOR_S10_0: 0.0.0.0
PEER_MME_IPV4_ADDRESS_FOR_S10_1: 0.0.0.0
MCC_SGW_0: '208'
MNC3_SGW_0: '096'
TAC_LB_SGW_0: '01'
TAC_HB_SGW_0: '00'
MCC_MME_0: '208'
MNC3_MME_0: '096'
TAC_LB_MME_0: '02'
TAC_HB_MME_0: '00'
MCC_MME_1: '208'
MNC3_MME_1: '096'
TAC_LB_MME_1: '03'
TAC_HB_MME_1: '00'
TAC_LB_SGW_TEST_0: '03'
TAC_HB_SGW_TEST_0: '00'
SGW_IPV4_ADDRESS_FOR_S11_TEST_0: 0.0.0.0
healthcheck:
test: /bin/bash -c "pgrep oai_mme"
interval: 10s
timeout: 5s
retries: 5
oai_spgwc:
image: oai-spgwc:develop-2021-06-14
privileged: true
depends_on: [oai_mme]
container_name: rfsim4g-oai-spgwc
networks:
public_net:
ipv4_address: 192.168.61.4
environment:
TZ: Europe/Paris
SGW_INTERFACE_NAME_FOR_S11: eth0
PGW_INTERFACE_NAME_FOR_SX: eth0
DEFAULT_DNS_IPV4_ADDRESS: 192.168.18.129
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
PUSH_PROTOCOL_OPTION: 'true'
APN_NI_1: oai.ipv4
APN_NI_2: oai.ipv4_2
DEFAULT_APN_NI_1: oai.ipv4
UE_IP_ADDRESS_POOL_1: '12.0.0.2 - 12.0.0.254'
UE_IP_ADDRESS_POOL_2: '12.1.1.2 - 12.1.1.254'
MCC: '208'
MNC: '96'
MNC03: '096'
TAC: 1
GW_ID: 1
REALM: openairinterface.org
healthcheck:
test: /bin/bash -c "pgrep oai_spgwc"
interval: 10s
timeout: 5s
retries: 5
oai_spgwu:
image: oai-spgwu-tiny:develop-2021-06-14
privileged: true
container_name: rfsim4g-oai-spgwu-tiny
depends_on: [oai_spgwc]
networks:
public_net:
ipv4_address: 192.168.61.5
environment:
TZ: Europe/Paris
PID_DIRECTORY: /var/run
INSTANCE: 1
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
PGW_INTERFACE_NAME_FOR_SGI: eth0
SGW_INTERFACE_NAME_FOR_SX: eth0
SPGWC0_IP_ADDRESS: 192.168.61.4
NETWORK_UE_IP: '12.0.0.0/24'
NETWORK_UE_NAT_OPTION: 'yes'
MCC: '208'
MNC: '96'
MNC03: '096'
TAC: 1
GW_ID: 1
REALM: openairinterface.org
healthcheck:
test: /bin/bash -c "pgrep oai_spgwu"
interval: 10s
timeout: 5s
retries: 5
flexran_rtc:
image: flexran-rtc:production
privileged: true
container_name: rfsim4g-flexran-rtc
networks:
public_net:
ipv4_address: 192.168.61.10
healthcheck:
test: /bin/bash -c "pgrep rt_controller"
interval: 10s
timeout: 5s
retries: 5
trf_gen:
image: trf-gen:production
privileged: true
container_name: rfsim4g-trf-gen
networks:
public_net:
ipv4_address: 192.168.61.11
entrypoint: /bin/bash -c "ip route add 12.0.0.0/24 via 192.168.61.5 dev eth0; sleep infinity"
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.61.5"
interval: 10s
timeout: 5s
retries: 5
enb:
image: oai-enb:develop
privileged: true
container_name: rfsim4g-oai-enb
networks:
public_net:
ipv4_address: 192.168.61.20
environment:
TZ: Europe/Paris
USE_FDD_MONO: 'yes'
RFSIMULATOR: enb
ENB_NAME: eNB-rf-sim
MCC: '208'
MNC: '96'
MNC_LENGTH: 2
TAC: 1
UTRA_BAND_ID: 7
DL_FREQUENCY_IN_MHZ: 2680
UL_FREQUENCY_OFFSET_IN_MHZ: 120
NID_CELL: 10
NB_PRB: 25
MME_S1C_IP_ADDRESS: 192.168.61.3
ENB_S1C_IF_NAME: eth0
ENB_S1C_IP_ADDRESS: 192.168.61.20
ENB_S1U_IF_NAME: eth0
ENB_S1U_IP_ADDRESS: 192.168.61.20
ENB_X2_IP_ADDRESS: 192.168.61.20
FLEXRAN_ENABLED: 'no'
FLEXRAN_INTERFACE_NAME: eth0
FLEXRAN_IPV4_ADDRESS: 192.168.61.10
USE_ADDITIONAL_OPTIONS: --rfsim
oai_ue0:
image: oai-lte-ue:develop
privileged: true
container_name: rfsim4g-oai-lte-ue0
networks:
public_net:
ipv4_address: 192.168.61.30
expose:
- "10000"
environment:
TZ: Europe/Paris
HOSTNAME: oai_ue0
RFSIMULATOR: 192.168.61.20
MCC: '208'
MNC: '96'
SHORT_IMSI: '0100000001'
LTE_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'
OPC: 'c42449363bbad02b66d16bc975d77cc1'
MSISDN: '001011234561010'
HPLMN: 20896
USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1
networks:
private_net:
name: rfsim4g-oai-private-net
ipam:
config:
- subnet: 192.168.68.0/26
public_net:
name: rfsim4g-oai-public-net
ipam:
config:
- subnet: 192.168.61.0/26
CREATE KEYSPACE IF NOT EXISTS vhss WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '1'};
CREATE TABLE IF NOT EXISTS vhss.users_imsi (
imsi text PRIMARY KEY,
access_restriction int,
idmmeidentity int,
imei text,
imei_sv text,
key text,
lipa_permissions text,
mme_cap int,
mmehost text,
mmeidentity_idmmeidentity int,
mmerealm text,
ms_ps_status text,
msisdn bigint,
niddvalidity text,
nir_dest_host text,
nir_dest_realm text,
opc text,
pgw_id int,
rand text,
rfsp_index varint,
sqn bigint,
subscription_data text,
ue_reachability varint,
urrp_mme varint,
user_identifier text,
visited_plmnid text);
CREATE TABLE IF NOT EXISTS vhss.msisdn_imsi (
msisdn bigint PRIMARY KEY,
imsi text
);
CREATE TABLE IF NOT EXISTS vhss.global_ids (
table_name text PRIMARY KEY,
id counter);
CREATE TABLE IF NOT EXISTS vhss.mmeidentity_host (
mmehost text PRIMARY KEY,
idmmeidentity int,
mmerealm text,
ue_reachability varint,
mmeisdn text);
CREATE TABLE IF NOT EXISTS vhss.mmeidentity (
idmmeidentity int PRIMARY KEY,
mmehost text,
mmerealm text,
ue_reachability varint,
mmeisdn text);
CREATE TABLE IF NOT EXISTS vhss.events (
scef_id text,
scef_ref_id bigint,
extid text,
monitoring_event_configuration text,
monitoring_type int,
msisdn bigint,
user_identifier text,
primary key (scef_id, scef_ref_id)
);
CREATE TABLE IF NOT EXISTS vhss.events_msisdn (
msisdn bigint,
scef_id text,
scef_ref_id bigint,
primary key (msisdn, scef_id, scef_ref_id)
);
CREATE TABLE IF NOT EXISTS vhss.events_extid (
extid text,
scef_id text,
scef_ref_id bigint,
primary key (extid, scef_id, scef_ref_id)
);
CREATE TABLE IF NOT EXISTS vhss.extid (
extid text primary key
);
CREATE TABLE IF NOT EXISTS vhss.extid_imsi (
extid text,
imsi text,
primary key (extid, imsi)
);
CREATE TABLE IF NOT EXISTS vhss.extid_imsi_xref (
imsi text,
extid text,
primary key (imsi, extid)
);
...@@ -283,7 +283,7 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -283,7 +283,7 @@ The following features are valid for the gNB and the 5G-NR UE.
- PTRS support - PTRS support
- Support for 1, 2 and 4 TX antennas - Support for 1, 2 and 4 TX antennas
- Support for up to 2 layers (currently limited to DMRS configuration type 2) - Support for up to 2 layers (currently limited to DMRS configuration type 2)
* NR-CSI Generation of sequence at PHY (**under integration**) * NR-CSIRS Generation of sequence at PHY
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- PUSCH mapping type A and B - PUSCH mapping type A and B
- DMRS configuration type 1 and 2 - DMRS configuration type 1 and 2
...@@ -319,6 +319,7 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -319,6 +319,7 @@ The following features are valid for the gNB and the 5G-NR UE.
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU - MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
- Scheduler procedures for SIB1 - Scheduler procedures for SIB1
- Scheduler procedures for RA - Scheduler procedures for RA
- Scheduler procedures for CSI-RS
- MAC downlink scheduler (fixed allocations) - MAC downlink scheduler (fixed allocations)
- MAC header generation (including timing advance) - MAC header generation (including timing advance)
- ACK / NACK handling and HARQ procedures for downlink - ACK / NACK handling and HARQ procedures for downlink
...@@ -349,7 +350,6 @@ The following features are valid for the gNB and the 5G-NR UE. ...@@ -349,7 +350,6 @@ The following features are valid for the gNB and the 5G-NR UE.
- PTRS support - PTRS support
- Support for 1, 2 and 4 RX antennas - Support for 1, 2 and 4 RX antennas
- Support for up to 2 layers (currently limited to DMRS configuration type 2) - Support for up to 2 layers (currently limited to DMRS configuration type 2)
* NR-CSI Generation of sequence at PHY (**under integration**)
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
- PUSCH mapping type A and B - PUSCH mapping type A and B
- DMRS configuration type 1 and 2 - DMRS configuration type 1 and 2
......
...@@ -60,6 +60,7 @@ RUN apt-get update && \ ...@@ -60,6 +60,7 @@ RUN apt-get update && \
net-tools \ net-tools \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
# At time of writing, it is 3.14 # At time of writing, it is 3.14
......
...@@ -61,6 +61,7 @@ RUN apt-get update && \ ...@@ -61,6 +61,7 @@ RUN apt-get update && \
net-tools \ net-tools \
iputils-ping \ iputils-ping \
iproute2 \ iproute2 \
iperf \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
# At time of writing, it is 3.14 # At time of writing, it is 3.14
......
...@@ -1571,8 +1571,7 @@ typedef struct ...@@ -1571,8 +1571,7 @@ typedef struct
{ {
uint8_t csi_part1_crc; uint8_t csi_part1_crc;
uint16_t csi_part1_bit_len; uint16_t csi_part1_bit_len;
//! fixme uint8_t* csi_part1_payload;
uint8_t* csi_part1_payload;//uint8_t[ceil(csiPart1BitLen/8)]
} nfapi_nr_csi_part1_pdu_t; } nfapi_nr_csi_part1_pdu_t;
...@@ -1581,8 +1580,7 @@ typedef struct ...@@ -1581,8 +1580,7 @@ typedef struct
{ {
uint8_t csi_part2_crc; uint8_t csi_part2_crc;
uint16_t csi_part2_bit_len; uint16_t csi_part2_bit_len;
//! fixme uint8_t* csi_part2_payload;
uint8_t* csi_part2_payload;//uint8_t[ceil(csiPart2BitLen/8)]
} nfapi_nr_csi_part2_pdu_t; } nfapi_nr_csi_part2_pdu_t;
//table 3-63 //table 3-63
......
...@@ -227,16 +227,14 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -227,16 +227,14 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
} }
} }
nr_init_csi_rs(gNB, cfg->cell_config.phy_cell_id.value);
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */ /* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
generate_lowpapr_typ1_refsig_sequences(SHRT_MAX); generate_lowpapr_typ1_refsig_sequences(SHRT_MAX);
nr_init_csi_rs(gNB, 0); // TODO scramblingID currently hardcoded to 0, to be taken from higher layer parameter scramblingID when implemented
/// Transport init necessary for NR synchro /// Transport init necessary for NR synchro
init_nr_transport(gNB); init_nr_transport(gNB);
gNB->first_run_I0_measurements = 1; gNB->first_run_I0_measurements = 1;
common_vars->rxdata = (int32_t **)malloc16(Prx*sizeof(int32_t*)); common_vars->rxdata = (int32_t **)malloc16(Prx*sizeof(int32_t*));
......
...@@ -443,9 +443,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -443,9 +443,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
else else
ue->pdsch_config_dedicated->p_a = dB0; ue->pdsch_config_dedicated->p_a = dB0;
// set channel estimation to do linear interpolation in time
ue->high_speed_flag = 1;
ue->ch_est_alpha = 24576;
// enable MIB/SIB decoding by default // enable MIB/SIB decoding by default
ue->decode_MIB = 1; ue->decode_MIB = 1;
ue->decode_SIB = 1; ue->decode_SIB = 1;
......
...@@ -145,7 +145,7 @@ void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid) ...@@ -145,7 +145,7 @@ void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid)
reset = 1; reset = 1;
x2 = ((1<<10) * (fp->symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid)); x2 = ((1<<10) * (fp->symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid));
for (uint32_t n=0; n<NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD; n++) { for (uint32_t n=0; n<NR_MAX_CSI_RS_INIT_LENGTH_DWORD; n++) {
csi_rs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset); csi_rs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset);
reset = 0; reset = 0;
} }
......
...@@ -22,17 +22,22 @@ ...@@ -22,17 +22,22 @@
#include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
//#define NR_CSIRS_DEBUG //#define NR_CSIRS_DEBUG
int nr_generate_csi_rs(uint32_t **gold_csi_rs,
int32_t** txdataF,
int16_t amp,
NR_DL_FRAME_PARMS frame_parms,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params)
{
int16_t mod_csi[frame_parms.symbols_per_slot][NR_MAX_CSI_RS_LENGTH>>1]; void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
int16_t amp,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params,
uint16_t cell_id,
int slot){
NR_DL_FRAME_PARMS frame_parms=gNB->frame_parms;
int32_t **txdataF = gNB->common_vars.txdataF;
int txdataF_offset = (slot%2)*frame_parms.samples_per_slot_wCP;
uint32_t **gold_csi_rs = gNB->nr_gold_csi_rs[slot];
int16_t mod_csi[frame_parms.symbols_per_slot][NR_MAX_CSI_RS_LENGTH>>1] __attribute__((aligned(16)));;
uint16_t b = csi_params.freq_domain; uint16_t b = csi_params.freq_domain;
uint16_t n, csi_bw, csi_start, p, k, l, mprime, na, kpn, csi_length; uint16_t n, csi_bw, csi_start, p, k, l, mprime, na, kpn, csi_length;
uint8_t size, ports, kprime, lprime, i, gs; uint8_t size, ports, kprime, lprime, i, gs;
...@@ -45,6 +50,22 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs, ...@@ -45,6 +50,22 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs,
AssertFatal(b!=0, "Invalid CSI frequency domain mapping: no bit selected in bitmap\n"); AssertFatal(b!=0, "Invalid CSI frequency domain mapping: no bit selected in bitmap\n");
// pre-computed for scrambling id equel to cell id
// if the scrambling id is not the cell id we need to re-initialize the rs
if (csi_params.scramb_id != cell_id) {
uint8_t reset;
uint32_t x1, x2;
uint32_t Nid = csi_params.scramb_id;
for (uint8_t symb=0; symb<frame_parms.symbols_per_slot; symb++) {
reset = 1;
x2 = ((1<<10) * (frame_parms.symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid));
for (uint32_t n=0; n<NR_MAX_CSI_RS_INIT_LENGTH_DWORD; n++) {
gold_csi_rs[symb][n] = lte_gold_generic(&x1, &x2, reset);
reset = 0;
}
}
}
switch (csi_params.row) { switch (csi_params.row) {
// implementation of table 7.4.1.5.3-1 of 38.211 // implementation of table 7.4.1.5.3-1 of 38.211
// lprime and kprime are the max value of l' and k' // lprime and kprime are the max value of l' and k'
...@@ -519,19 +540,15 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs, ...@@ -519,19 +540,15 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs,
case 0: case 0:
beta = (amp*ONE_OVER_SQRT2_Q15)>>15; beta = (amp*ONE_OVER_SQRT2_Q15)>>15;
break; break;
case 1: case 1:
beta = amp; beta = amp;
break; break;
case 2: case 2:
beta = (amp*ONE_OVER_SQRT2_Q15)>>14; beta = (amp*ONE_OVER_SQRT2_Q15)>>14;
break; break;
case 3: case 3:
beta = amp<<1; beta = amp<<1;
break; break;
default: default:
AssertFatal(0==1, "Invalid SS power offset density index for CSI\n"); AssertFatal(0==1, "Invalid SS power offset density index for CSI\n");
} }
...@@ -548,7 +565,6 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs, ...@@ -548,7 +565,6 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs,
nr_modulation(gold_csi_rs[symb+1], csi_length, DMRS_MOD_ORDER, mod_csi[symb+1]); nr_modulation(gold_csi_rs[symb+1], csi_length, DMRS_MOD_ORDER, mod_csi[symb+1]);
} }
} }
} }
uint16_t start_sc = frame_parms.first_carrier_offset; uint16_t start_sc = frame_parms.first_carrier_offset;
...@@ -586,16 +602,17 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs, ...@@ -586,16 +602,17 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs,
} }
// ZP CSI RS // ZP CSI RS
if (csi_params.csi_type == 2) { if (csi_params.csi_type == 2) {
((int16_t*)txdataF[p])[(l*frame_parms.ofdm_symbol_size + k)<<1] = 0; ((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1)+(2*txdataF_offset)] = 0;
((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = 0; ((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1)+1+(2*txdataF_offset)] = 0;
} }
else { else {
((int16_t*)txdataF[p])[(l*frame_parms.ofdm_symbol_size + k)<<1] = (beta*wt*wf*mod_csi[l][mprime<<1]) >> 15; ((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1)+(2*txdataF_offset)] = (beta*wt*wf*mod_csi[l][mprime<<1]) >> 15;
((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = (beta*wt*wf*mod_csi[l][(mprime<<1) + 1]) >> 15; ((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1)+1+(2*txdataF_offset)] = (beta*wt*wf*mod_csi[l][(mprime<<1) + 1]) >> 15;
} }
#ifdef NR_CSIRS_DEBUG #ifdef NR_CSIRS_DEBUG
printf("l,k (%d %d) seq. index %d \t port %d \t (%d,%d)\n",l,k-start_sc,mprime,p+3000,((int16_t*)txdataF[p])[(l*frame_parms.ofdm_symbol_size + k)<<1], printf("l,k (%d %d) seq. index %d \t port %d \t (%d,%d)\n",l,k,mprime,p+3000,
((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1]); ((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1)+(2*txdataF_offset)],
((int16_t*)txdataF[p])[((l*frame_parms.ofdm_symbol_size + k)<<1)+1+(2*txdataF_offset)]);
#endif #endif
} }
} }
...@@ -603,6 +620,4 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs, ...@@ -603,6 +620,4 @@ int nr_generate_csi_rs(uint32_t **gold_csi_rs,
} }
} }
} }
return 0;
} }
...@@ -326,11 +326,11 @@ void init_prach_list(PHY_VARS_gNB *gNB); ...@@ -326,11 +326,11 @@ void init_prach_list(PHY_VARS_gNB *gNB);
void init_prach_ru_list(RU_t *ru); void init_prach_ru_list(RU_t *ru);
void free_nr_ru_prach_entry(RU_t *ru, int prach_id); void free_nr_ru_prach_entry(RU_t *ru, int prach_id);
int nr_generate_csi_rs(uint32_t **gold_csi_rs, void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
int32_t **txdataF,
int16_t amp, int16_t amp,
NR_DL_FRAME_PARMS frame_parms, nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params); uint16_t cell_id,
int slot);
void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id); void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id);
......
...@@ -289,7 +289,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -289,7 +289,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
int32_t corr_re[2]; int32_t corr_re[2];
int32_t corr_im[2]; int32_t corr_im[2];
//int32_t no_corr = 0;
int seq_index; int seq_index;
int64_t temp; int64_t temp;
int64_t av_corr=0; int64_t av_corr=0;
...@@ -1375,7 +1375,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1375,7 +1375,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
rp2_im[aa] = (__m256i*)r_im_ext2[aa]; rp2_im[aa] = (__m256i*)r_im_ext2[aa];
} }
__m256i prod_re[Prx2],prod_im[Prx2]; __m256i prod_re[Prx2],prod_im[Prx2];
int64_t corr=0; uint64_t corr=0;
int cw_ML=0; int cw_ML=0;
...@@ -1389,7 +1389,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1389,7 +1389,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
} }
printf("\n"); printf("\n");
#endif #endif
int64_t corr_tmp = 0; uint64_t corr_tmp = 0;
for (int group=0;group<ngroup;group++) { for (int group=0;group<ngroup;group++) {
// do complex correlation // do complex correlation
...@@ -1503,7 +1503,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1503,7 +1503,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
corr_re = ( corr32_re[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_re[aa]))[0]); corr_re = ( corr32_re[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_re[aa]))[0]);
corr_im = ( corr32_im[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_im[aa]))[0]); corr_im = ( corr32_im[half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_im[aa]))[0]);
corr_tmp += corr_re*corr_re + corr_im*corr_im; corr_tmp += corr_re*corr_re + corr_im*corr_im;
/*
LOG_D(PHY,"pucch2 half_prb %d cw %d (%d,%d) aa %d: (%d,%d,%d,%d,%d,%d,%d,%d)x(%d,%d,%d,%d,%d,%d,%d,%d) (%d,%d)+(%d,%d) = (%d,%d) => %d\n", LOG_D(PHY,"pucch2 half_prb %d cw %d (%d,%d) aa %d: (%d,%d,%d,%d,%d,%d,%d,%d)x(%d,%d,%d,%d,%d,%d,%d,%d) (%d,%d)+(%d,%d) = (%d,%d) => %d\n",
half_prb,cw,cw&15,cw>>4,aa, half_prb,cw,cw&15,cw>>4,aa,
((int16_t*)&pucch2_polar_4bit[cw&15])[0],((int16_t*)&pucch2_polar_4bit[cw>>4])[0], ((int16_t*)&pucch2_polar_4bit[cw&15])[0],((int16_t*)&pucch2_polar_4bit[cw>>4])[0],
...@@ -1520,15 +1520,15 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1520,15 +1520,15 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
corr_re, corr_re,
corr_im, corr_im,
corr_tmp); corr_tmp);
*/
} }
corr16 = _mm_set1_epi16((int16_t)(corr_tmp>>8)); corr16 = _mm_set1_epi16((int16_t)(corr_tmp>>8));
/*
LOG_D(PHY,"half_prb %d cw %d corr16 %d\n",half_prb,cw,corr_tmp>>8); LOG_D(PHY,"half_prb %d cw %d corr16 %d\n",half_prb,cw,corr_tmp>>8);
*/
llr_num = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_num_lut[cw]),llr_num); llr_num = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_num_lut[cw]),llr_num);
llr_den = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_den_lut[cw]),llr_den); llr_den = _mm_max_epi16(_mm_mullo_epi16(corr16,pucch2_polar_llr_den_lut[cw]),llr_den);
/*
LOG_D(PHY,"lut_num (%d,%d,%d,%d,%d,%d,%d,%d)\n", LOG_D(PHY,"lut_num (%d,%d,%d,%d,%d,%d,%d,%d)\n",
((int16_t*)&pucch2_polar_llr_num_lut[cw])[0], ((int16_t*)&pucch2_polar_llr_num_lut[cw])[0],
((int16_t*)&pucch2_polar_llr_num_lut[cw])[1], ((int16_t*)&pucch2_polar_llr_num_lut[cw])[1],
...@@ -1557,7 +1557,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, ...@@ -1557,7 +1557,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
((int16_t*)&llr_den)[5], ((int16_t*)&llr_den)[5],
((int16_t*)&llr_den)[6], ((int16_t*)&llr_den)[6],
((int16_t*)&llr_den)[7]); ((int16_t*)&llr_den)[7]);
*/
} }
// compute llrs // compute llrs
llrs[half_prb] = _mm_subs_epi16(llr_num,llr_den); llrs[half_prb] = _mm_subs_epi16(llr_num,llr_den);
......
...@@ -222,9 +222,6 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -222,9 +222,6 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier; unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier;
if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size; if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size;
if (ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
ch_offset = ue->frame_parms.ofdm_symbol_size ;
else
ch_offset = ue->frame_parms.ofdm_symbol_size*symbol; ch_offset = ue->frame_parms.ofdm_symbol_size*symbol;
AssertFatal(dmrss >= 0 && dmrss < 3, AssertFatal(dmrss >= 0 && dmrss < 3,
...@@ -283,10 +280,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -283,10 +280,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset];
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size)); memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size));
if (ue->high_speed_flag==0) // multiply previous channel estimate by ch_est_alpha
multadd_complex_vector_real_scalar(dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),
ue->ch_est_alpha,dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),
1,ue->frame_parms.ofdm_symbol_size);
#ifdef DEBUG_CH #ifdef DEBUG_CH
printf("pbch ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL); printf("pbch ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL);
printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset); printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset);
...@@ -488,10 +482,6 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -488,10 +482,6 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
int **dl_ch_estimates =ue->pdcch_vars[proc->thread_id][gNB_id]->dl_ch_estimates; int **dl_ch_estimates =ue->pdcch_vars[proc->thread_id][gNB_id]->dl_ch_estimates;
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF;
if (ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
ch_offset = ue->frame_parms.ofdm_symbol_size ;
else
ch_offset = ue->frame_parms.ofdm_symbol_size*symbol; ch_offset = ue->frame_parms.ofdm_symbol_size*symbol;
symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol; symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol;
...@@ -527,10 +517,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -527,10 +517,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset];
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size)); memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size));
if (ue->high_speed_flag==0) // multiply previous channel estimate by ch_est_alpha
multadd_complex_vector_real_scalar(dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),
ue->ch_est_alpha,dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),
1,ue->frame_parms.ofdm_symbol_size);
#ifdef DEBUG_PDCCH #ifdef DEBUG_PDCCH
printf("pdcch ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL); printf("pdcch ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL);
printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset); printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset);
...@@ -677,9 +664,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -677,9 +664,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
int **dl_ch_estimates =ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates; int **dl_ch_estimates =ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates;
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF;
if (ue->high_speed_flag == 0)
ch_offset = ue->frame_parms.ofdm_symbol_size;
else
ch_offset = ue->frame_parms.ofdm_symbol_size*symbol; ch_offset = ue->frame_parms.ofdm_symbol_size*symbol;
symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol; symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol;
...@@ -798,10 +782,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -798,10 +782,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch = (int16_t *)&dl_ch_estimates[p*ue->frame_parms.nb_antennas_rx+aarx][ch_offset]; dl_ch = (int16_t *)&dl_ch_estimates[p*ue->frame_parms.nb_antennas_rx+aarx][ch_offset];
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size)); memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size));
if (ue->high_speed_flag==0) // multiply previous channel estimate by ch_est_alpha
multadd_complex_vector_real_scalar(dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),
ue->ch_est_alpha,dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),
1,ue->frame_parms.ofdm_symbol_size);
#ifdef DEBUG_PDSCH #ifdef DEBUG_PDSCH
printf("ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL); printf("ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL);
printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset); printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset);
......
...@@ -392,11 +392,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -392,11 +392,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]); stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %u.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n", printf("[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
frame,nr_slot_rx,slot,symbol,ue->high_speed_flag,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0)); frame,nr_slot_rx,slot,symbol,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n", LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
frame,nr_slot_rx,slot,symbol,ue->high_speed_flag,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0)); frame,nr_slot_rx,slot,symbol,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
......
...@@ -166,8 +166,7 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini ...@@ -166,8 +166,7 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
frame_parms, frame_parms,
0, 0,
temp_ptr->i_ssb, temp_ptr->i_ssb,
SISO, SISO);
ue->high_speed_flag);
temp_ptr=temp_ptr->next_ssb; temp_ptr=temp_ptr->next_ssb;
} }
......
...@@ -54,7 +54,6 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -54,7 +54,6 @@ uint16_t nr_pbch_extract(int **rxdataF,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
uint32_t symbol, uint32_t symbol,
uint32_t s_offset, uint32_t s_offset,
uint32_t high_speed_flag,
NR_DL_FRAME_PARMS *frame_parms) { NR_DL_FRAME_PARMS *frame_parms) {
uint16_t rb; uint16_t rb;
uint8_t i,j,aarx; uint8_t i,j,aarx;
...@@ -138,10 +137,7 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -138,10 +137,7 @@ uint16_t nr_pbch_extract(int **rxdataF,
} }
} }
if (high_speed_flag == 1)
dl_ch0 = &dl_ch_estimates[aarx][((symbol+s_offset)*(frame_parms->ofdm_symbol_size))]; dl_ch0 = &dl_ch_estimates[aarx][((symbol+s_offset)*(frame_parms->ofdm_symbol_size))];
else
dl_ch0 = &dl_ch_estimates[aarx][0];
//printf("dl_ch0 addr %p\n",dl_ch0); //printf("dl_ch0 addr %p\n",dl_ch0);
dl_ch0_ext = &dl_ch_estimates_ext[aarx][symbol*20*12]; dl_ch0_ext = &dl_ch_estimates_ext[aarx][symbol*20*12];
...@@ -420,8 +416,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -420,8 +416,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t gNB_id, uint8_t gNB_id,
uint8_t i_ssb, uint8_t i_ssb,
MIMO_mode_t mimo_mode, MIMO_mode_t mimo_mode) {
uint32_t high_speed_flag) {
NR_UE_COMMON *nr_ue_common_vars = &ue->common_vars; NR_UE_COMMON *nr_ue_common_vars = &ue->common_vars;
int max_h=0; int max_h=0;
...@@ -470,7 +465,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -470,7 +465,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
nr_ue_pbch_vars->dl_ch_estimates_ext, nr_ue_pbch_vars->dl_ch_estimates_ext,
symbol, symbol,
symbol_offset, symbol_offset,
high_speed_flag,
frame_parms); frame_parms);
#ifdef DEBUG_PBCH #ifdef DEBUG_PBCH
LOG_I(PHY,"[PHY] PBCH Symbol %d ofdm size %d\n",symbol, frame_parms->ofdm_symbol_size ); LOG_I(PHY,"[PHY] PBCH Symbol %d ofdm size %d\n",symbol, frame_parms->ofdm_symbol_size );
......
...@@ -1170,8 +1170,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -1170,8 +1170,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id, uint8_t eNB_id,
uint8_t i_ssb, uint8_t i_ssb,
MIMO_mode_t mimo_mode, MIMO_mode_t mimo_mode);
uint32_t high_speed_flag);
int nr_pbch_detection(UE_nr_rxtx_proc_t *proc, int nr_pbch_detection(UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue, PHY_VARS_NR_UE *ue,
......
...@@ -120,6 +120,13 @@ typedef struct { ...@@ -120,6 +120,13 @@ typedef struct {
nfapi_nr_dl_tti_pdcch_pdu pdcch_pdu; nfapi_nr_dl_tti_pdcch_pdu pdcch_pdu;
} NR_gNB_PDCCH_t; } NR_gNB_PDCCH_t;
typedef struct {
uint8_t active;
int frame;
int slot;
nfapi_nr_dl_tti_csi_rs_pdu csirs_pdu;
} NR_gNB_CSIRS_t;
typedef struct { typedef struct {
int frame; int frame;
int slot; int slot;
...@@ -760,6 +767,7 @@ typedef struct PHY_VARS_gNB_s { ...@@ -760,6 +767,7 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_PUSCH *pusch_vars[NUMBER_OF_NR_ULSCH_MAX]; NR_gNB_PUSCH *pusch_vars[NUMBER_OF_NR_ULSCH_MAX];
NR_gNB_PUCCH_t *pucch[NUMBER_OF_NR_PUCCH_MAX]; NR_gNB_PUCCH_t *pucch[NUMBER_OF_NR_PUCCH_MAX];
NR_gNB_PDCCH_t pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX]; NR_gNB_PDCCH_t pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX];
NR_gNB_CSIRS_t csirs_pdu[NUMBER_OF_NR_CSIRS_MAX];
NR_gNB_UL_PDCCH_t ul_pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX]; NR_gNB_UL_PDCCH_t ul_pdcch_pdu[NUMBER_OF_NR_PDCCH_MAX];
NR_gNB_DLSCH_t *dlsch[NUMBER_OF_NR_DLSCH_MAX][2]; // Nusers times two spatial streams NR_gNB_DLSCH_t *dlsch[NUMBER_OF_NR_DLSCH_MAX][2]; // Nusers times two spatial streams
NR_gNB_ULSCH_t *ulsch[NUMBER_OF_NR_ULSCH_MAX][2]; // [Nusers times][2 codewords] NR_gNB_ULSCH_t *ulsch[NUMBER_OF_NR_ULSCH_MAX][2]; // [Nusers times][2 codewords]
......
...@@ -859,9 +859,9 @@ typedef struct { ...@@ -859,9 +859,9 @@ typedef struct {
uint32_t X_u[64][839]; uint32_t X_u[64][839];
uint32_t high_speed_flag;
uint32_t perfect_ce; uint32_t perfect_ce;
int16_t ch_est_alpha;
int generate_ul_signal[NUMBER_OF_CONNECTED_gNB_MAX]; int generate_ul_signal[NUMBER_OF_CONNECTED_gNB_MAX];
UE_NR_SCAN_INFO_t scan_info[NB_BANDS_MAX]; UE_NR_SCAN_INFO_t scan_info[NB_BANDS_MAX];
......
...@@ -111,10 +111,9 @@ void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB, ...@@ -111,10 +111,9 @@ void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB,
nr_fill_dci(gNB,frame,slot,pdcch_pdu); nr_fill_dci(gNB,frame,slot,pdcch_pdu);
} }
void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
int frame, int slot, int frame, int slot,
nfapi_nr_ul_dci_request_pdus_t *ul_dci_request_pdu) { nfapi_nr_ul_dci_request_pdus_t *ul_dci_request_pdu) {
...@@ -128,6 +127,30 @@ void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB, ...@@ -128,6 +127,30 @@ void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
} }
void handle_nfapi_nr_csirs_pdu(PHY_VARS_gNB *gNB,
int frame, int slot,
nfapi_nr_dl_tti_csi_rs_pdu *csirs_pdu) {
int found = 0;
for (int id=0; id<NUMBER_OF_NR_CSIRS_MAX; id++) {
NR_gNB_CSIRS_t *csirs = &gNB->csirs_pdu[id];
if (csirs->active == 0) {
LOG_D(PHY,"Frame %d Slot %d CSI_RS with ID %d is now active\n",frame,slot,id);
csirs->frame = frame;
csirs->slot = slot;
csirs->active = 1;
memcpy((void*)&csirs->csirs_pdu, (void*)csirs_pdu, sizeof(nfapi_nr_dl_tti_csi_rs_pdu));
found = 1;
break;
}
}
if (found == 0)
LOG_E(MAC,"CSI-RS list is full\n");
}
void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot, void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu, nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu,
uint8_t *sdu) uint8_t *sdu)
...@@ -195,6 +218,12 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ ...@@ -195,6 +218,12 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
pdcch_received = 1; pdcch_received = 1;
break; break;
case NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE:
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_DL_TTI_CSI_RS_PDU_TYPE for %d.%d\n",frame,slot,DL_req->SFN,DL_req->Slot);
handle_nfapi_nr_csirs_pdu(gNB,
frame, slot,
&dl_tti_pdu->csi_rs_pdu);
break;
case NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE: case NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE:
{ {
......
...@@ -43,6 +43,10 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB, ...@@ -43,6 +43,10 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,
void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO); void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO);
void handle_nfapi_nr_csirs_pdu(PHY_VARS_gNB *gNB,
int frame, int slot,
nfapi_nr_dl_tti_csi_rs_pdu *csirs_pdu);
void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB, void handle_nfapi_nr_pdcch_pdu(PHY_VARS_gNB *gNB,
int frame, int subframe, int frame, int subframe,
nfapi_nr_dl_tti_pdcch_pdu *dcl_dl_pdu); nfapi_nr_dl_tti_pdcch_pdu *dcl_dl_pdu);
......
...@@ -194,6 +194,18 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -194,6 +194,18 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
} }
for (int i=0;i<NUMBER_OF_NR_CSIRS_MAX;i++){
NR_gNB_CSIRS_t *csirs = &gNB->csirs_pdu[i];
if ((csirs->active == 1) &&
(csirs->frame == frame) &&
(csirs->slot == slot) ) {
LOG_D(PHY, "CSI-RS generation started in frame %d.%d\n",frame,slot);
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params = csirs->csirs_pdu.csi_rs_pdu_rel15;
nr_generate_csi_rs(gNB, AMP, csi_params, gNB->gNB_config.cell_config.phy_cell_id.value, slot);
csirs->active = 0;
}
}
if (do_meas==1) stop_meas(&gNB->phy_proc_tx); if (do_meas==1) stop_meas(&gNB->phy_proc_tx);
if ((frame&127) == 0) dump_pdsch_stats(gNB); if ((frame&127) == 0) dump_pdsch_stats(gNB);
......
...@@ -358,8 +358,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id, ...@@ -358,8 +358,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
&ue->frame_parms, &ue->frame_parms,
gNB_id, gNB_id,
(ue->frame_parms.ssb_index)&7, (ue->frame_parms.ssb_index)&7,
SISO, SISO);
ue->high_speed_flag);
if (ret==0) { if (ret==0) {
...@@ -788,8 +787,6 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_ ...@@ -788,8 +787,6 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
} }
#endif #endif
} }
if ( ue->high_speed_flag == 0 ) //for slow speed case only estimate the channel once per slot
break;
} }
} }
......
...@@ -711,8 +711,7 @@ int main(int argc, char **argv) ...@@ -711,8 +711,7 @@ int main(int argc, char **argv)
frame_parms, frame_parms,
0, 0,
ssb_index%8, ssb_index%8,
SISO, SISO);
UE->high_speed_flag);
if (ret==0) { if (ret==0) {
//UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically //UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically
......
...@@ -107,9 +107,9 @@ ...@@ -107,9 +107,9 @@
#define MACRLC_LOCAL_S_PORTD_IDX 15 #define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16 #define MACRLC_REMOTE_S_PORTD_IDX 16
#define MACRLC_ULSCH_MAX_SLOTS_INACTIVITY 17 #define MACRLC_ULSCH_MAX_SLOTS_INACTIVITY 17
#define MACRLC_PUSCHTARGETSNRX10_IDX 17 #define MACRLC_PUSCHTARGETSNRX10_IDX 18
#define MACRLC_PUCCHTARGETSNRX10_IDX 18 #define MACRLC_PUCCHTARGETSNRX10_IDX 19
#define MACRLC_PUCCHFAILURETHRES_IDX 19 #define MACRLC_PUCCHFAILURETHRES_IDX 20
#define MACRLC_PUSCHFAILURETHRES_IDX 20 #define MACRLC_PUSCHFAILURETHRES_IDX 21
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif #endif
...@@ -1985,10 +1985,13 @@ find_UE_id(module_id_t mod_idP, ...@@ -1985,10 +1985,13 @@ find_UE_id(module_id_t mod_idP,
{ {
int UE_id; int UE_id;
UE_info_t *UE_info = &RC.mac[mod_idP]->UE_info; UE_info_t *UE_info = &RC.mac[mod_idP]->UE_info;
if(!UE_info)
return -1;
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_info->active[UE_id] == TRUE) { if (UE_info->active[UE_id] == TRUE) {
if (UE_info->UE_template[UE_PCCID(mod_idP, UE_id)][UE_id].rnti == rntiP) { int CC_id = UE_PCCID(mod_idP, UE_id);
if (CC_id>=0 && CC_id<NFAPI_CC_MAX && UE_info->UE_template[CC_id][UE_id].rnti == rntiP) {
return UE_id; return UE_id;
} }
} }
......
...@@ -789,11 +789,10 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){ ...@@ -789,11 +789,10 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){
} }
// Handlig failure of RA procedure @ MAC layer // Handling failure of RA procedure @ MAC layer
// according to section 5 of 3GPP TS 38.321 version 16.2.1 Release 16 // according to section 5 of 3GPP TS 38.321 version 16.2.1 Release 16
// todo: // todo:
// - complete handling of received contention-based RA preamble // - complete handling of received contention-based RA preamble
// - 2-step RA implementation
void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_resources, frame_t frame, int slot) { void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_resources, frame_t frame, int slot) {
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
...@@ -806,29 +805,19 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res ...@@ -806,29 +805,19 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res
prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER++; prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER++;
if(prach_resources->RA_TYPE == RA_4STEP){
if (prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER == ra->preambleTransMax + 1){ if (prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER == ra->preambleTransMax + 1){
LOG_D(MAC, "In %s: [UE %d][%d.%d] Maximum number of RACH attempts (%d) reached, selecting backoff time...\n", __FUNCTION__, mod_id, frame, slot, ra->preambleTransMax); LOG_D(MAC, "In %s: [UE %d][%d.%d] Maximum number of RACH attempts (%d) reached, selecting backoff time...\n",
__FUNCTION__, mod_id, frame, slot, ra->preambleTransMax);
ra->RA_backoff_cnt = rand() % (prach_resources->RA_PREAMBLE_BACKOFF + 1); ra->RA_backoff_cnt = rand() % (prach_resources->RA_PREAMBLE_BACKOFF + 1);
prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER = 1; prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER = 1;
prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP += 2; // 2 dB increment prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP += 2; // 2 dB increment
prach_resources->ra_PREAMBLE_RECEIVED_TARGET_POWER = nr_get_Po_NOMINAL_PUSCH(prach_resources, mod_id, CC_id); prach_resources->ra_PREAMBLE_RECEIVED_TARGET_POWER = nr_get_Po_NOMINAL_PUSCH(prach_resources, mod_id, CC_id);
} else { } else {
// Resetting RA window // Resetting RA window
nr_get_RA_window(mac); nr_get_RA_window(mac);
}
} else if (prach_resources->RA_TYPE == RA_2STEP){
LOG_E(MAC, "Missing implementation of RA failure handling for 2-step RA...\n");
} }
} }
...@@ -430,6 +430,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -430,6 +430,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This schedule SR // This schedule SR
nr_sr_reporting(module_idP, frame, slot); nr_sr_reporting(module_idP, frame, slot);
// Schedule CSI-RS transmission
nr_csirs_scheduling(module_idP, frame, slot, nr_slots_per_frame[*scc->ssbSubcarrierSpacing]);
// Schedule CSI measurement reporting: check in slot 0 for the whole frame // Schedule CSI measurement reporting: check in slot 0 for the whole frame
if (slot == 0) if (slot == 0)
nr_csi_meas_reporting(module_idP, frame, slot); nr_csi_meas_reporting(module_idP, frame, slot);
......
...@@ -1539,8 +1539,10 @@ void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, NR_RA_t ...@@ -1539,8 +1539,10 @@ void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, NR_RA_t
ra->state = RA_IDLE; ra->state = RA_IDLE;
ra->timing_offset = 0; ra->timing_offset = 0;
ra->RRC_timer = 20; ra->RRC_timer = 20;
ra->rnti = 0;
ra->msg3_round = 0; ra->msg3_round = 0;
if(ra->cfra == false) {
ra->rnti = 0;
}
} }
......
...@@ -711,7 +711,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -711,7 +711,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
current_rnti); current_rnti);
if( (frameP==ra->Msg3_frame) && (slotP==ra->Msg3_slot) ) { if( (frameP==ra->Msg3_frame) && (slotP==ra->Msg3_slot) ) {
LOG_W(NR_MAC, "Random Access %i failed at state %i (TC_RNTI %04x RNTI %04x\n", i, ra->state,ra->rnti,current_rnti); LOG_W(NR_MAC, "Random Access %i failed at state %i (TC_RNTI %04x RNTI %04x)\n", i, ra->state,ra->rnti,current_rnti);
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
} }
...@@ -722,6 +722,13 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -722,6 +722,13 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
int UE_id=-1; int UE_id=-1;
UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->CellGroup); UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti, ra->CellGroup);
if (UE_id<0) {
LOG_W(NR_MAC, "Random Access %i discarded at state %i (TC_RNTI %04x RNTI %04x): max number of users achieved!\n", i, ra->state,ra->rnti,current_rnti);
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
return;
}
UE_info->UE_beam_index[UE_id] = ra->beam_id; UE_info->UE_beam_index[UE_id] = ra->beam_id;
// re-initialize ta update variables after RA procedure completion // re-initialize ta update variables after RA procedure completion
......
...@@ -178,7 +178,13 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -178,7 +178,13 @@ void nr_schedule_pucch(int Mod_idP,
frame_t frameP, frame_t frameP,
sub_frame_t slotP); sub_frame_t slotP);
void csi_period_offset(const NR_CSI_ReportConfig_t *csirep, void nr_csirs_scheduling(int Mod_idP,
frame_t frame,
sub_frame_t slot,
int n_slots_frame);
void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
NR_NZP_CSI_RS_Resource_t *nzpcsi,
int *period, int *offset); int *period, int *offset);
void nr_csi_meas_reporting(int Mod_idP, void nr_csi_meas_reporting(int Mod_idP,
......
...@@ -440,7 +440,8 @@ struct CRI_RI_LI_PMI_CQI { ...@@ -440,7 +440,8 @@ struct CRI_RI_LI_PMI_CQI {
uint8_t li; uint8_t li;
uint8_t pmi_x1; uint8_t pmi_x1;
uint8_t pmi_x2; uint8_t pmi_x2;
uint8_t cqi; uint8_t wb_cqi_1tb;
uint8_t wb_cqi_2tb;
}; };
typedef struct CRI_SSB_RSRP { typedef struct CRI_SSB_RSRP {
......
...@@ -3070,7 +3070,10 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -3070,7 +3070,10 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
ue_context_p, ue_context_p,
NGAP_CAUSE_RADIO_NETWORK, NGAP_CAUSE_RADIO_NETWORK,
30); 30);
}else{ }
// Remove here the MAC and RRC context when RRC is not connected or gNB is not connected to CN5G
if(ue_context_p->ue_context.StatusRrc < NR_RRC_CONNECTED || ue_context_p->ue_context.gNB_ue_ngap_id == 0) {
mac_remove_nr_ue(ctxt_pP->module_id, ctxt_pP->rnti); mac_remove_nr_ue(ctxt_pP->module_id, ctxt_pP->rnti);
rrc_rlc_remove_ue(ctxt_pP); rrc_rlc_remove_ue(ctxt_pP);
pdcp_remove_UE(ctxt_pP); pdcp_remove_UE(ctxt_pP);
...@@ -3082,6 +3085,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -3082,6 +3085,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
LOG_I(NR_RRC, "remove UE %x \n", ctxt_pP->rnti); LOG_I(NR_RRC, "remove UE %x \n", ctxt_pP->rnti);
} }
} }
break; // break RB_FOREACH break; // break RB_FOREACH
} }
} }
......
This diff is collapsed.
...@@ -86,10 +86,7 @@ static parser_command_line_t nasParserCommandLine = { ...@@ -86,10 +86,7 @@ static parser_command_line_t nasParserCommandLine = {
"-trace", "<mask>", "Logging trace level\t\t", "-trace", "<mask>", "Logging trace level\t\t",
NAS_PARSER_DEFAULT_TRACE_LEVEL NAS_PARSER_DEFAULT_TRACE_LEVEL
}, },
{ {"-uhost", "<uhost>", "User app layer's hostname\t", "NULL"},
"-uhost", "<uhost>", "User app layer's hostname\t",
NAS_PARSER_DEFAULT_USER_HOSTNAME
},
{ {
"-nhost", "<nhost>", "Network layer's hostname\t", "-nhost", "<nhost>", "Network layer's hostname\t",
NAS_PARSER_DEFAULT_NETWORK_HOSTNAME NAS_PARSER_DEFAULT_NETWORK_HOSTNAME
......
...@@ -55,7 +55,7 @@ Description NAS command line parser ...@@ -55,7 +55,7 @@ Description NAS command line parser
#define NAS_PARSER_DEFAULT_UE_ID "1" #define NAS_PARSER_DEFAULT_UE_ID "1"
/* User application layer default hostname */ /* User application layer default hostname */
#define NAS_PARSER_DEFAULT_USER_HOSTNAME "localhost" #define NAS_PARSER_DEFAULT_USER_HOSTNAME NULL
/* User application layer default port number */ /* User application layer default port number */
#define NAS_PARSER_DEFAULT_USER_PORT_NUMBER "10000" #define NAS_PARSER_DEFAULT_USER_PORT_NUMBER "10000"
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
# define NUMBER_OF_NR_ULSCH_MAX 8 # define NUMBER_OF_NR_ULSCH_MAX 8
# define NUMBER_OF_NR_DLSCH_MAX 8 # define NUMBER_OF_NR_DLSCH_MAX 8
# define NUMBER_OF_NR_UCI_MAX 16 # define NUMBER_OF_NR_UCI_MAX 16
# define nUMBER_OF_NR_SRS_MAX 16 # define NUMBER_OF_NR_SRS_MAX 16
# define NUMBER_OF_NR_CSIRS_MAX 16
# define NUMBER_OF_SCH_STATS_MAX 16 # define NUMBER_OF_SCH_STATS_MAX 16
# define NUMBER_OF_NR_SCH_STATS_MAX 16 # define NUMBER_OF_NR_SCH_STATS_MAX 16
......
...@@ -25,10 +25,6 @@ gNBs = ...@@ -25,10 +25,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
#pusch_TargetSNRx10 = 200;
#pucch_TargetSNRx10 = 200;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -236,6 +232,8 @@ MACRLCs = ( ...@@ -236,6 +232,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 0; ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -229,6 +227,8 @@ MACRLCs = ( ...@@ -229,6 +227,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 0; ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -213,6 +211,8 @@ MACRLCs = ( ...@@ -213,6 +211,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 0; ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -227,6 +225,8 @@ MACRLCs = ( ...@@ -227,6 +225,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -263,7 +263,7 @@ RUs = ( ...@@ -263,7 +263,7 @@ RUs = (
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 118; max_rxgain = 118;
eNB_instances = [0]; eNB_instances = [0];
clock_src = "external"; clock_src = "internal";
} }
); );
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -227,6 +225,8 @@ MACRLCs = ( ...@@ -227,6 +225,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
...@@ -249,7 +249,7 @@ RUs = ( ...@@ -249,7 +249,7 @@ RUs = (
max_pdschReferenceSignalPower = -27; max_pdschReferenceSignalPower = -27;
max_rxgain = 114; max_rxgain = 114;
eNB_instances = [0]; eNB_instances = [0];
#clock_src = "external"; clock_src = "internal";
} }
); );
......
...@@ -24,8 +24,6 @@ gNBs = ...@@ -24,8 +24,6 @@ gNBs =
ssb_SubcarrierOffset = 31; //0; ssb_SubcarrierOffset = 31; //0;
pdsch_AntennaPorts = 1; pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1; pusch_AntennaPorts = 1;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
servingCellConfigCommon = ( servingCellConfigCommon = (
{ {
...@@ -243,6 +241,8 @@ MACRLCs = ( ...@@ -243,6 +241,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -230,6 +230,8 @@ MACRLCs = ( ...@@ -230,6 +230,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100; ulsch_max_slots_inactivity = 100;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -230,6 +230,8 @@ MACRLCs = ( ...@@ -230,6 +230,8 @@ MACRLCs = (
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100; ulsch_max_slots_inactivity = 100;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
...@@ -258,6 +258,8 @@ MACRLCs = ( ...@@ -258,6 +258,8 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
} }
); );
......
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