Commit 72d89206 authored by Fang-WANG's avatar Fang-WANG

add yunsdr

parent 517e1b12
diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
index c0abf6acb0..f81b29b60a 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
@@ -951,6 +951,7 @@ typedef struct
{
uint16_t dl_bandwidth;//Carrier bandwidth for DL in MHz [38.104, sec 5.3.2] Values: 5, 10, 15, 20, 25, 30, 40,50, 60, 70, 80,90,100,200,400
uint32_t dl_frequency; //Absolute frequency of DL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
+ uint32_t halfbw; //Absolute frequency of DL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
uint16_t dl_k0[5];//𝑘_{0}^{𝜇} for each of the numerologies [38.211, sec 5.3.1] Value: 0 ->23699
uint16_t dl_grid_size[5];//Grid size 𝑁_{𝑔𝑟𝑖𝑑}^{𝑠𝑖𝑧𝑒,𝜇} for each of the numerologies [38.211, sec 4.4.2] Value: 0->275 0 = this numerology not used
uint16_t num_tx_ant;//Number of Tx antennas
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
index 1e7e10def7..11fec6e1e1 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
@@ -1467,6 +1467,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp,
uint64_t *dl_Carrier,
uint64_t *ul_Carrier);
+void nr_set_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t dl_carrier);
/*!
\brief This function sets the OAI RF card rx/tx params
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
index 6cf782d9d8..8891b6884b 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
@@ -33,6 +33,8 @@
#include "nr_transport_proto_ue.h"
#include "executables/softmodem-common.h"
+extern openair0_config_t openair0_cfg[];
+
void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uint64_t *ul_carrier){
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1 || !downlink_frequency[0][0]) {
@@ -48,6 +50,54 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uin
}
+void nr_set_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t dl_carrier){
+ uint8_t mod_id = 0;
+ uint8_t cc_id = 0;
+ PHY_VARS_NR_UE *ue = PHY_vars_UE_g[mod_id][cc_id];
+ int rf_chain = ue->rf_map.chain;
+ uint64_t ul_carrier;
+
+ if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1 || !downlink_frequency[0][0]) {
+ fp->dl_CarrierFreq = dl_carrier;
+ } else {
+ downlink_frequency[0][0] = dl_carrier;
+ }
+ LOG_I(PHY, "downlink_frequency %ld, dl_carrier %ld\n", downlink_frequency[0][0], dl_carrier);
+
+ if (uplink_frequency_offset[0][0])
+ ul_carrier = dl_carrier + uplink_frequency_offset[0][0];
+ else
+ ul_carrier = dl_carrier + fp->ul_CarrierFreq - fp->dl_CarrierFreq;
+
+ for (int i = rf_chain; i < rf_chain + 4; i++) {
+
+ if (i < openair0_cfg->rx_num_channels)
+ openair0_cfg->rx_freq[i + rf_chain] = dl_carrier + ue->common_vars.freq_offset;
+ else
+ openair0_cfg->rx_freq[i] = 0.0;
+
+ if (i < openair0_cfg->tx_num_channels)
+ openair0_cfg->tx_freq[i] = ul_carrier + ue->common_vars.freq_offset;
+ else
+ openair0_cfg->tx_freq[i] = 0.0;
+
+
+ if (i < openair0_cfg->rx_num_channels) {
+ LOG_I(PHY, "new HW: Configuring channel %d (rf_chain %d): setting tx_gain %f, rx_gain %f, tx_freq %f Hz, rx_freq %f Hz\n",
+ i,
+ rf_chain,
+ openair0_cfg->tx_gain[i],
+ openair0_cfg->rx_gain[i],
+ openair0_cfg->tx_freq[i],
+ openair0_cfg->rx_freq[i]);
+ }
+
+ ue->rfdevice.trx_set_freq_func(&ue->rfdevice,&openair0_cfg[0],0);
+
+ }
+
+}
+
void nr_rf_card_config(openair0_config_t *openair0_cfg,
double rx_gain_offset,
uint64_t ul_carrier,
diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
index c276de847d..14b34fc825 100644
--- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
@@ -40,6 +40,8 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/impl_defs_nr.h"
+#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
+
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
const char *dl_pdu_type[]={"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH"};
@@ -269,12 +271,49 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
+ NR_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[0][0]->frame_parms;
+ uint64_t centreFreq;
+ uint8_t kssb;
fapi_nr_config_request_t *nrUE_config = &PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->nrUE_config;
+ int freq_changed = 0;
+
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &phy_config->config_req,
+ phy_config->config_req.ssb_table.ssb_subcarrier_offset,
+ phy_config->config_req.carrier_config.dl_frequency,
+ phy_config->config_req.carrier_config.halfbw);
+
+ //if (phy_config->config_req.ssb_table.ssb_subcarrier_offset != nrUE_config->ssb_table.ssb_subcarrier_offset)
+ {
+ kssb = nrUE_config->ssb_table.ssb_subcarrier_offset;
+ LOG_I(PHY, "save the kssb %d\n", kssb);
+ }
+ //else
+ {
+// kssb = phy_config->config_req.ssb_table.ssb_subcarrier_offset;
+ }
+ if (phy_config->config_req.ssb_table.ssb_offset_point_a != nrUE_config->ssb_table.ssb_offset_point_a)
+ {
+ freq_changed = 1;
+ LOG_I(PHY, "dlfrequency %ld %ld, pointA %d %d, ssb offset %d %d\n",
+ phy_config->config_req.carrier_config.dl_frequency, nrUE_config->carrier_config.dl_frequency,
+ phy_config->config_req.ssb_table.ssb_offset_point_a, nrUE_config->ssb_table.ssb_offset_point_a,
+ phy_config->config_req.ssb_table.ssb_subcarrier_offset, nrUE_config->ssb_table.ssb_subcarrier_offset);
+ }
if(phy_config != NULL) {
memcpy(nrUE_config,&phy_config->config_req,sizeof(fapi_nr_config_request_t));
if (PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] == NOT_SYNCHED)
PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] = PRACH;
+
+ }
+
+ if (freq_changed)
+ {
+ nrUE_config->ssb_table.ssb_subcarrier_offset = kssb;
+
+ centreFreq = phy_config->config_req.carrier_config.dl_frequency + phy_config->config_req.carrier_config.halfbw + nrUE_config->ssb_table.ssb_subcarrier_offset * 15;
+
+ nr_set_carrier_frequencies(fp, centreFreq);
}
return 0;
}
diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c
index 6a3bf0d4d8..67a0926504 100755
--- a/openair2/LAYER2/NR_MAC_UE/config_ue.c
+++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c
@@ -337,8 +337,18 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->carrierBandwidth,
*scc_SIB->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list.array[0]->freqBandIndicatorNR);
- cfg->carrier_config.dl_frequency = downlink_frequency[0][0] - (10+scc_SIB->downlinkConfigCommon.frequencyInfoDL.offsetToPointA)*(15<<scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing);
-
+ cfg->carrier_config.dl_frequency = downlink_frequency[0][0] -
+ (10+scc_SIB->downlinkConfigCommon.frequencyInfoDL.offsetToPointA/2)*(15<<scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing)*12;
+
+ LOG_I(PHY, "downlink_frequency %ld\n", downlink_frequency[0][0]);
+
+ cfg->carrier_config.halfbw = (15<<scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing)
+ * scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->carrierBandwidth
+ * 6;
+ cfg->ssb_table.ssb_subcarrier_offset = 0;
+
+
+ // shoule take consider the ssb offset at the end.
for (i=0; i<5; i++) {
if (i==scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing) {
cfg->carrier_config.dl_grid_size[i] = scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->carrierBandwidth;
@@ -390,11 +400,24 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
// SSB Table config
- cfg->ssb_table.ssb_offset_point_a = scc_SIB->downlinkConfigCommon.frequencyInfoDL.offsetToPointA;
+ cfg->ssb_table.ssb_offset_point_a = scc_SIB->downlinkConfigCommon.frequencyInfoDL.offsetToPointA / 2;
cfg->ssb_table.ssb_period = scc_SIB->ssb_PeriodicityServingCell;
//cfg->ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
- LOG_I(PHY, "in SIB, ssb_offset_point_a %d, ssb_subcarrier_offset %d\n", cfg->ssb_table.ssb_offset_point_a, cfg->ssb_table.ssb_subcarrier_offset);
+ LOG_I(PHY, "in SIB, addr %p ssb_offset_point_a %d, ssb_subcarrier_offset %d, bw %d, sibscs %d, freqPointA %ld, bw %d\n", cfg,
+ cfg->ssb_table.ssb_offset_point_a, cfg->ssb_table.ssb_subcarrier_offset,
+ scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->carrierBandwidth,
+ scc_SIB->uplinkConfigCommon->frequencyInfoUL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
+ cfg->carrier_config.dl_frequency,
+ scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->carrierBandwidth
+ );
+
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request0 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
+
AssertFatal(scc_SIB->ssb_PositionsInBurst.groupPresence==NULL, "Cannot handle more than 8 SSBs for now (%x.%x.%x.%x.%x.%x.%x.%x)\n",
scc_SIB->ssb_PositionsInBurst.groupPresence->buf[0],
scc_SIB->ssb_PositionsInBurst.groupPresence->buf[1],
@@ -699,9 +722,9 @@ int nr_rrc_mac_config_req_ue(
mac->mib = mibP; // update by every reception
mac->phy_config.Mod_id = module_id;
mac->phy_config.CC_id = cc_idP;
- mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
+ // mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
mac->phy_config.config_req.tdd_table.tdd_period_in_slots=5<<get_softmodem_params()->numerology;
- mac->phy_config.config_req.ssb_table.ssb_offset_point_a = (N_RB_DL-20)>>1;
+ //mac->phy_config.config_req.ssb_table.ssb_offset_point_a = (N_RB_DL-20)>>1;
}
AssertFatal(scell_group_config == NULL || cell_group_config == NULL,
"both scell_group_config and cell_group_config cannot be non-NULL\n");
@@ -711,12 +734,29 @@ int nr_rrc_mac_config_req_ue(
mac->scc_SIB=sccP;
LOG_I(MAC,"Keeping ServingCellConfigCommonSIB\n");
config_common_ue(mac,module_id,cc_idP);
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request1 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
int num_slots_ul = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
if (mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols>0) num_slots_ul++;
LOG_I(MAC, "Initializing ul_config_request. num_slots_ul = %d\n", num_slots_ul);
mac->ul_config_request = (fapi_nr_ul_config_request_t *)calloc(num_slots_ul, sizeof(fapi_nr_ul_config_request_t));
// Setup the SSB to Rach Occasions mapping according to the config
+
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request2 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
build_ssb_to_ro_map(mac);//->scc, mac->phy_config.config_req.cell_config.frame_duplex_type);
+
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request3 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
mac->if_module->phy_config_request(&mac->phy_config);
mac->common_configuration_complete = 1;
}
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index eb376a1568..090ee9d0f2 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -110,6 +110,11 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
mac->physCellId = cell_id;
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request00 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
nr_mac_rrc_data_ind_ue( module_id, cc_id, gNB_index, 0, 0, 0, NR_BCCH_BCH, (uint8_t *) pduP, 3 ); // fixed 3 bytes MIB PDU
AssertFatal(mac->mib != NULL, "nr_ue_decode_mib() mac->mib == NULL\n");
@@ -162,6 +167,11 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
uint16_t ssb_start_symbol = get_ssb_start_symbol(band,scs_ssb,ssb_index);
uint16_t ssb_offset_point_a = (ssb_start_subcarrier - ssb_subcarrier_offset / 2)/12;
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request01 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
get_type0_PDCCH_CSS_config_parameters(&mac->type0_PDCCH_CSS_config,
frame,
mac->mib,
@@ -173,6 +183,11 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
ssb_index,
ssb_offset_point_a);
+
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request02 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
LOG_I(MAC,"in mib : ssb_start_subcarrier %d, ssb_subcarrier_offset %d, ssb_offset_point_a %d\n",
ssb_start_subcarrier, ssb_subcarrier_offset, ssb_offset_point_a );
mac->type0_pdcch_ss_mux_pattern = mac->type0_PDCCH_CSS_config.type0_pdcch_ss_mux_pattern;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index b2364a6116..383e87e8ba 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -1811,16 +1811,39 @@ void build_ssb_to_ro_map(NR_UE_MAC_INST_t *mac) {
memset(&ssb_list, 0, sizeof(ssb_list_info_t));
// Build the list of all the valid RACH occasions in the maximum association pattern period according to the PRACH config
- LOG_D(NR_MAC,"Build RO list\n");
+ LOG_I(NR_MAC,"Build RO list\n");
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request20 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
build_ro_list(mac);
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request21 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
+
// Build the list of all the valid/transmitted SSBs according to the config
- LOG_D(NR_MAC,"Build SSB list\n");
+ LOG_I(NR_MAC,"Build SSB list\n");
build_ssb_list(mac);
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request22 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
+
// Map the transmitted SSBs to the ROs and create the association pattern according to the config
- LOG_D(NR_MAC,"Map SSB to RO\n");
+ LOG_I(NR_MAC,"Map SSB to RO\n");
map_ssb_to_ro(mac);
+
+ LOG_I(PHY, "addr %p nr_ue_phy_config_request23 ssb_subcarrier_offset %d, dlfreq(point) %ld, bw %d\n", &mac->phy_config.config_req,
+ mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset,
+ mac->phy_config.config_req.carrier_config.dl_frequency,
+ mac->phy_config.config_req.carrier_config.halfbw);
+
LOG_D(NR_MAC,"Map SSB to RO done\n");
}
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
index 1a39def26..758855b59 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
@@ -262,8 +262,8 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING, VCD_FUNCTION_IN);
- LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
- LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
+ LOG_I(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
+ LOG_I(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
if (harq_process->ndi != harq_process->pusch_pdu.pusch_data.new_data_indicator) { // this is a new packet
#ifdef DEBUG_ULSCH_CODING
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
max_I0 0 (rb 0), min_I0 0 (rb 0), avg I0 0
PRACH I0 = 0.0 dB
ULSCH RNTI db5a: ulsch_power[0] 51,0 ulsch_noise_power[0] 0.0
round_trials 161(0.0e+00):0(0.0e+00):0(0.0e+00):0, DTX 0, current_Qm 2, current_RI 1, total_bytes RX/SCHED 0/12812
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 27bc569517..b11f3b8574 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -726,8 +726,9 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
rel15 = &pdcch_vars->pdcch_config[i];
int n_rb,rb_offset;
get_coreset_rballoc(rel15->coreset.frequency_domain_resource,&n_rb,&rb_offset);
- LOG_D(PHY,"pdcch coreset: freq %x, n_rb %d, rb_offset %d\n",
- rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset);
+ //if (slot == 11)
+ LOG_D(PHY,"frame %d %d rnti 0x%x space %d, pdcch coreset: freq %x, n_rb %d, rb_offset %d, symbol %d %d\n",frame, slot, i, rel15->rnti,
+ rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset, rel15->coreset.StartSymbolIndex, rel15->coreset.duration);
for (int s=rel15->coreset.StartSymbolIndex; s<(rel15->coreset.StartSymbolIndex+rel15->coreset.duration); s++) {
LOG_D(PHY,"in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n");
@@ -754,6 +755,19 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
avgs = cmax(avgs, avgP[aarx]);
log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx;
+// if (slot == 11)
+// LOG_I(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
+#if 0
+ if(avgP[0] >1000)
+ {
+ static int log_int = 0;
+ if ((rel15->rnti == 0x10b) && (log_int == 0))
+ {
+ log_int = 1;
+ LOG_M("rxdataF_ra.m", "rxdataF0", &common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][s * frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size,1,1);
+ }
+ }
+#endif
#ifdef UE_DEBUG_TRACE
LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
#endif
@@ -784,6 +798,21 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
pdcch_vars->llr,
s,
n_rb);
+
+#if 0
+ if(avgP[0] >1000)
+ {
+ static int log_int = 0;
+ if ((rel15->rnti == 0xFFFF) && (log_int == 0))
+ {
+ log_int = 1;
+ LOG_I(PHY,"log: frame %d %d rnti 0x%x space %d, pdcch coreset: freq %x, n_rb %d, rb_offset %d, symbol %d %d\n",frame, slot, i, rel15->rnti,
+ rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset, rel15->coreset.StartSymbolIndex, rel15->coreset.duration);
+ LOG_M("rxdataF_si_Fcomp.m", "si_Fcomp", &pdcch_vars->rxdataF_comp[0][s * n_rb * 12],n_rb * 12,1,1);
+ LOG_M("rxdataF_si_llr.m", "si_llr", &pdcch_vars->llr[2 * s * n_rb * 9],n_rb * 9,1,1);
+ }
+ }
+#endif
#if T_TRACER
// T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL),
@@ -797,6 +826,19 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
}
LOG_D(PHY,"we enter nr_pdcch_demapping_deinterleaving()\n");
+
+ if (slot == 11)
+ {
+ LOG_D(PHY, "pdcch frame %d slot %d, dur %d, rb %d, RegBundleSize %d, InterleaverSize %d, ShiftIndex %d, candidates %d\n",
+ frame, slot,
+ rel15->coreset.duration,
+ n_rb,
+ rel15->coreset.RegBundleSize,
+ rel15->coreset.InterleaverSize,
+ rel15->coreset.ShiftIndex,
+ rel15->number_of_candidates
+ );
+ }
nr_pdcch_demapping_deinterleaving((uint32_t *) pdcch_vars->llr,
(uint32_t *) pdcch_vars->e_rx,
rel15->coreset.duration,
@@ -807,6 +849,20 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
rel15->number_of_candidates,
rel15->CCE,
rel15->L);
+
+#if 0
+ if(avgP[0] >1000)
+ {
+ static int log_int = 0;
+ if ((rel15->rnti == 0x10b) && (log_int == 0))
+ {
+ log_int = 1;
+ LOG_I(PHY,"log: frame %d %d rnti 0x%x space %d, pdcch coreset: freq %x, n_rb %d, rb_offset %d, symbol %d %d\n",frame, slot, i, rel15->rnti,
+ rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset, rel15->coreset.StartSymbolIndex, rel15->coreset.duration);
+ LOG_M("rxdataF_ra_e_rx.m", "ra_e_rx", &pdcch_vars->e_rx[0],n_rb * 9,1,1);
+ }
+ }
+#endif
/*
nr_pdcch_unscrambling(rel15->rnti,
frame_parms,
@@ -928,9 +984,11 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
currentPtrDCI);
n_rnti = rel15->rnti;
- LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length);
+ if ((proc->nr_slot_rx == 11) || (proc->nr_slot_rx == 0))
+ LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d, L %d, payloadSize %d), scramble rnti %d, scramble id %d, crc %d\n",
+ proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind, L, dci_length, rel15->coreset.scrambling_rnti, rel15->coreset.pdcch_dmrs_scrambling_id, crc);
if (crc == n_rnti) {
- LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)\n",
+ LOG_I(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)\n",
proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length,*(unsigned long long*)dci_estimation);
dci_ind->SFN = proc->frame_rx;
dci_ind->slot = proc->nr_slot_rx;
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
index b85b777566..1dd58be9c2 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
@@ -354,7 +354,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process->G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, dmrs_length, harq_process->Qm,harq_process->Nl);
G = harq_process->G;
- LOG_D(PHY,"DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d\n",harq_pid,A,A/8,G, nb_re_dmrs,harq_process->mcs, harq_process->Nl, nb_symb_sch,nb_rb);
+ LOG_I(PHY,"DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d\n",harq_pid,A,A/8,G, nb_re_dmrs,harq_process->mcs, harq_process->Nl, nb_symb_sch,nb_rb);
if ((harq_process->R)<1024)
Coderate = (float) (harq_process->R) /(float) 1024;
@@ -622,7 +622,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
if (err_flag == 1) {
- LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
+ LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
phy_vars_ue->Mod_id, frame, nr_slot_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
harq_process->harq_ack.ack = 0;
@@ -645,7 +645,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return((1 + dlsch->max_ldpc_iterations));
} else {
- LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d\n",
+ LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d\n",
phy_vars_ue->Mod_id,nr_slot_rx,harq_process->TBS,harq_process->mcs,harq_process->nb_rb, harq_process->round);
harq_process->status = SCH_IDLE;
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
index 76fe180aba..d4977a180e 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
@@ -186,9 +186,9 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
// now generate PRACH signal
#ifdef NR_PRACH_DEBUG
if (NCS>0)
- LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %d msg1 frequency start %d\n",
+ LOG_I(PHY, "PRACH [UE %d] generate PRACH in slot %d preamble_index %d for RootSeqIndex %d, Preamble Index %d, PRACH Format %s, NCS %d (N_ZC %d): Preamble_offset %d, Preamble_shift %d msg1 frequency start %d\n",
Mod_id,
- slot,
+ slot, preamble_index,
rootSequenceIndex,
preamble_index,
prachfmt[prach_fmt_id],
@@ -217,8 +217,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
k += kbar;
k *= 2;
- LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id,
- slot,
+ LOG_I(PHY, "PRACH [UE %d] in slot %d, preamble_index %d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id,
+ slot, preamble_index,
k,
n_ra_prb,
nrUE_config->prach_config.num_prach_fd_occasions_list[fd_occasion].k1,
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 1680b59ab7..51f01fcf4c 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -689,7 +689,7 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
//LOG_D(PHY,"[UE %d][PUSCH] Frame %d nr_slot_rx %d PHICH RX\n",ue->Mod_id,frame_rx,nr_slot_rx);
for (int i=0; i<dci_cnt; i++) {
- LOG_D(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI %i of %d total DCIs found --> rnti %x : format %d\n",
+ LOG_I(PHY,"[UE %d] AbsSubFrame %d.%d, Mode %s: DCI %i of %d total DCIs found --> rnti %x : format %d\n",
ue->Mod_id,frame_rx%1024,nr_slot_rx,nr_mode_string[ue->UE_mode[gNB_id]],
i + 1,
dci_cnt,
@@ -772,7 +772,8 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
uint16_t s1 = dlsch0_harq->nb_symbols;
bool is_SI = dlsch0->rnti_type == _SI_RNTI_;
- LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0->harq_processes[harq_pid]->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos);
+
+ LOG_I(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0->harq_processes[harq_pid]->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos);
for (m = s0; m < (s0 +s1); m++) {
if (((1<<m)&dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos) > 0) {
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
index df5bb70c06..bc7c42daa5 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
@@ -365,7 +365,9 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + ((taus()) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA));
}
}
- prach_resources->ra_PreambleIndex = ra->ra_PreambleIndex;
+ //prach_resources->ra_PreambleIndex = ra->ra_PreambleIndex;
+ prach_resources->ra_PreambleIndex = ra->starting_preamble_nb;
+
}
// RA-RNTI computation (associated to PRACH occasion in which the RA Preamble is transmitted)
@@ -385,7 +387,7 @@ uint16_t set_ra_rnti(NR_UE_MAC_INST_t *mac, fapi_nr_ul_config_prach_pdu *prach_p
ra->ra_rnti = 1 + s_id + 14 * t_id + 1120 * f_id + 8960 * ul_carrier_id;
- LOG_D(MAC, "Computed ra_RNTI is %x \n", ra->ra_rnti);
+ LOG_I(MAC, "Computed ra_RNTI is %x \n", ra->ra_rnti);
return ra->ra_rnti;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index a8bf67834b..1356d451a6 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -54,7 +54,7 @@ dci_pdu_rel15_t *def_dci_pdu_rel15;
void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) {
LOG_D(MAC,"Filling search candidates for DCI\n");
-
+
uint8_t aggregation;
find_aggregation_candidates(&aggregation,
&rel15->number_of_candidates,
@@ -171,8 +171,17 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
} else { // NSA mode is not using the Initial BWP
rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
}
+ rel15->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
+ rel15->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_RA, rel15->BWPSize, bwp_id);
+ LOG_D(PHY, "ss_id %d, ra rnti bwp %d %d, dci len %d freqsource 0x %2x %2x %2x %2x %2x %2x\n", ss_id, rel15->BWPStart, rel15->BWPSize, rel15->dci_length_options[0],
+ rel15->coreset.frequency_domain_resource[0],
+ rel15->coreset.frequency_domain_resource[1],
+ rel15->coreset.frequency_domain_resource[2],
+ rel15->coreset.frequency_domain_resource[3],
+ rel15->coreset.frequency_domain_resource[4],
+ rel15->coreset.frequency_domain_resource[5]);
break;
case NR_RNTI_P:
break;
@@ -205,6 +214,14 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
for (int i = 0; i < rel15->num_dci_options; i++) {
rel15->dci_length_options[i] = nr_dci_size(initialUplinkBWP, mac->cg, def_dci_pdu_rel15, rel15->dci_format_options[i], NR_RNTI_SI, rel15->BWPSize, 0);
+ //LOG_I(PHY, "si rnti bwp %d %d, dci len %d\n", rel15->BWPStart, rel15->BWPSize, rel15->dci_length_options[0]);
+ LOG_D(PHY, "ss_id %d, si rnti bwp %d %d, dci len %d freqsource 0x %2x %2x %2x %2x %2x %2x\n", ss_id, rel15->BWPStart, rel15->BWPSize, rel15->dci_length_options[0],
+ rel15->coreset.frequency_domain_resource[0],
+ rel15->coreset.frequency_domain_resource[1],
+ rel15->coreset.frequency_domain_resource[2],
+ rel15->coreset.frequency_domain_resource[3],
+ rel15->coreset.frequency_domain_resource[4],
+ rel15->coreset.frequency_domain_resource[5]);
}
break;
case NR_RNTI_SFI:
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index fca085c16c..d45505f2c9 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -629,6 +629,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
} else {
if (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti){
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH;
+
+
} else {
dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH;
}
@@ -646,6 +648,14 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup;
BWPSize = dlsch_config_pdu_1_0->BWPSize;
}
+
+ dlsch_config_pdu_1_0->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
+ dlsch_config_pdu_1_0->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
+ dlsch_config_pdu_1_0->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon;
+ if (pdsch_config) pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; // For PDSCH with mapping type A, the UE shall assume dmrs-AdditionalPosition='pos2'
+ BWPSize = dlsch_config_pdu_1_0->BWPSize;
+
+
} else if (mac->DLbwp[0]) {
dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
@@ -658,7 +668,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
pdsch_config = NULL;
}
}
-
+ LOG_I(MAC, "rar : bwp %d %d\n", dlsch_config_pdu_1_0->BWPStart, dlsch_config_pdu_1_0->BWPSize);
/* IDENTIFIER_DCI_FORMATS */
/* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */
if (nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,0,BWPSize,dci->frequency_domain_assignment.val) < 0) {
@@ -1173,6 +1183,10 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
} else {
N_RB = get_n_rb(mac, rnti_type);
}
+ N_RB = mac->type0_PDCCH_CSS_config.num_rbs;
+ // Freq domain assignment 0-16 bit
+ fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
+ pos+=fsize;
// Freq domain assignment
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
pos=fsize;
@@ -1205,6 +1219,18 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
#ifdef DEBUG_EXTRACT_DCI
LOG_D(MAC,"tb_scaling %d (2 bits)=> %d (0x%lx)\n",dci_pdu_rel15->tb_scaling,dci_size-pos,*dci_pdu);
#endif
+
+ LOG_I(MAC,"N_RB = %i\n", N_RB);
+ LOG_I(MAC,"dci_size = %i\n", dci_size);
+ LOG_I(MAC,"fsize = %i\n", fsize);
+ LOG_I(MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val);
+ LOG_I(MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val);
+ LOG_I(MAC,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val);
+ LOG_I(MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs);
+ LOG_I(MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv);
+ LOG_I(MAC,"dci_pdu_rel15->system_info_indicator = %i\n", dci_pdu_rel15->system_info_indicator);
+
+
break;
case NR_RNTI_C:
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
index 1adc81d556..f5d00aee65 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
@@ -262,9 +262,9 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING, VCD_FUNCTION_IN);
- LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
- LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
- LOG_D(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator);
+ LOG_I(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
+ LOG_I(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
+ LOG_I(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator);
if (harq_process->first_tx == 1 ||
harq_process->ndi != harq_process->pusch_pdu.pusch_data.new_data_indicator) { // this is a new packet
#ifdef DEBUG_ULSCH_CODING
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
index 18fe11d40a..57dd4869b8 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
@@ -146,8 +146,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
get_num_re_dmrs(pusch_pdu, &nb_dmrs_re_per_rb, &number_dmrs_symbols);
- LOG_D(PHY,"ulsch %x : start_rb %d bwp_start %d start_sc %d start_symbol %d num_symbols %d cdmgrpsnodata %d num_dmrs %d dmrs_re_per_rb %d\n",
- rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb);
+ LOG_I(PHY,"ulsch frame %d %d, %x : start_rb %d bwp_start %d start_sc %d start_symbol %d num_symbols %d cdmgrpsnodata %d num_dmrs %d dmrs_re_per_rb %d, dmrs pos 0x%4x\n",
+ frame, slot, rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb, ul_dmrs_symb_pos);
// TbD num_of_mod_symbols is set but never used
N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 06f62abbf6..5007a7cf31 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -772,15 +772,20 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
}
- LOG_D(NR_MAC, "In %s: received UL grant (rb_start %d, rb_size %d, start_symbol_index %d, nr_of_symbols %d) for RNTI type %s \n",
+ LOG_I(NR_MAC, "In %s: received UL grant (rb_start %d, rb_size %d, start_symbol_index %d, nr_of_symbols %d, mcs %d) for RNTI type %s \n",
__FUNCTION__,
pusch_config_pdu->rb_start,
pusch_config_pdu->rb_size,
pusch_config_pdu->start_symbol_index,
pusch_config_pdu->nr_of_symbols,
+ pusch_config_pdu->mcs_index,
rnti_types[rnti_type]);
- pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask << pusch_config_pdu->start_symbol_index;;
+ //pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask << pusch_config_pdu->start_symbol_index;;
+ pusch_config_pdu->ul_dmrs_symb_pos = fill_dmrs_mask(NULL,
+ mac->mib->dmrs_TypeA_Position,
+ pusch_config_pdu->nr_of_symbols,
+ pusch_config_pdu->start_symbol_index);
pusch_config_pdu->target_code_rate = nr_get_code_rate_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
pusch_config_pdu->qam_mod_order = nr_get_Qm_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 4a16b2939c..b5e695613b 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -509,7 +509,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
int N_PRB_oh = 0;
int rnti_type = get_rnti_type(mac, rnti);
-
+ int mappingtype;
// Common configuration
pusch_config_pdu->dmrs_config_type = pusch_dmrs_type1;
pusch_config_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
@@ -527,7 +527,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
// Note: for Msg3 or MsgA PUSCH transmission the N_PRB_oh is always set to 0
NR_BWP_Uplink_t *ubwp = mac->ULbwp[0];
NR_BWP_UplinkDedicated_t *ibwp;
- int scs,abwp_start,abwp_size,startSymbolAndLength,mappingtype;
+ int scs,abwp_start,abwp_size,startSymbolAndLength;
NR_PUSCH_Config_t *pusch_Config=NULL;
if (mac->cg && ubwp &&
mac->cg->spCellConfig &&
@@ -830,7 +830,14 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->nr_of_symbols,
rnti_types[rnti_type]);
- pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask;
+// pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask;
+ pusch_config_pdu->ul_dmrs_symb_pos = fill_dmrs_mask(NULL,
+ mac->mib->dmrs_TypeA_Position,
+ pusch_config_pdu->nr_of_symbols,
+ pusch_config_pdu->start_symbol_index,
+ mappingtype);
+
+
pusch_config_pdu->target_code_rate = nr_get_code_rate_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
pusch_config_pdu->qam_mod_order = nr_get_Qm_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
index 1adc81d556..f5d00aee65 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
@@ -262,9 +262,9 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING, VCD_FUNCTION_IN);
- LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
- LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
- LOG_D(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator);
+ LOG_I(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
+ LOG_I(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
+ LOG_I(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator);
if (harq_process->first_tx == 1 ||
harq_process->ndi != harq_process->pusch_pdu.pusch_data.new_data_indicator) { // this is a new packet
#ifdef DEBUG_ULSCH_CODING
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
index 18fe11d40a..57dd4869b8 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
@@ -146,8 +146,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
get_num_re_dmrs(pusch_pdu, &nb_dmrs_re_per_rb, &number_dmrs_symbols);
- LOG_D(PHY,"ulsch %x : start_rb %d bwp_start %d start_sc %d start_symbol %d num_symbols %d cdmgrpsnodata %d num_dmrs %d dmrs_re_per_rb %d\n",
- rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb);
+ LOG_I(PHY,"ulsch frame %d %d, %x : start_rb %d bwp_start %d start_sc %d start_symbol %d num_symbols %d cdmgrpsnodata %d num_dmrs %d dmrs_re_per_rb %d, dmrs pos 0x%4x\n",
+ frame, slot, rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb, ul_dmrs_symb_pos);
// TbD num_of_mod_symbols is set but never used
N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 06f62abbf6..5007a7cf31 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -772,15 +772,20 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
}
- LOG_D(NR_MAC, "In %s: received UL grant (rb_start %d, rb_size %d, start_symbol_index %d, nr_of_symbols %d) for RNTI type %s \n",
+ LOG_I(NR_MAC, "In %s: received UL grant (rb_start %d, rb_size %d, start_symbol_index %d, nr_of_symbols %d, mcs %d) for RNTI type %s \n",
__FUNCTION__,
pusch_config_pdu->rb_start,
pusch_config_pdu->rb_size,
pusch_config_pdu->start_symbol_index,
pusch_config_pdu->nr_of_symbols,
+ pusch_config_pdu->mcs_index,
rnti_types[rnti_type]);
- pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask << pusch_config_pdu->start_symbol_index;;
+ //pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask << pusch_config_pdu->start_symbol_index;;
+ pusch_config_pdu->ul_dmrs_symb_pos = fill_dmrs_mask(NULL,
+ mac->mib->dmrs_TypeA_Position,
+ pusch_config_pdu->nr_of_symbols,
+ pusch_config_pdu->start_symbol_index);
pusch_config_pdu->target_code_rate = nr_get_code_rate_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
pusch_config_pdu->qam_mod_order = nr_get_Qm_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table);
diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 53ec70330c..4a4593282d 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -497,6 +497,10 @@ static inline int get_readBlockSize(uint16_t slot, NR_DL_FRAME_PARMS *fp) {
return rem_samples + next_slot_first_symbol;
}
+int global_slot_rx = 0;
+int global_frame_rx = 0;
+
+
void *UE_thread(void *arg) {
//this thread should be over the processing thread to keep in real time
PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *) arg;
@@ -619,6 +623,9 @@ void *UE_thread(void *arg) {
curMsg->proc.frame_rx = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
curMsg->proc.frame_tx = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
curMsg->proc.decoded_frame_rx=-1;
+ global_slot_rx = curMsg->proc.nr_slot_rx;
+ global_frame_rx = curMsg->proc.frame_rx;
+
//LOG_I(PHY,"Process slot %d thread Idx %d total gain %d\n", slot_nr, thread_idx, UE->rx_total_gain_dB);
#ifdef OAI_ADRV9371_ZC706
diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
index c0abf6acb0..1467c8613d 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
@@ -463,6 +463,9 @@ typedef struct {
double scaling_factor_S;
int8_t accumulated_delta_PUCCH;
uint8_t pucch_resource_id;
+ uint8_t n_CCE;
+ uint8_t N_CCE;
+
uint8_t pdsch_to_harq_feedback_time_ind;
uint8_t n_dmrs_cdm_groups;
uint8_t dmrs_ports[10];
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 5d4d9df47e..ab55264a7d 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -978,6 +978,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
dci_ind->slot = proc->nr_slot_rx;
dci_ind->dci_list[dci_ind->number_of_dcis].rnti = n_rnti;
dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE = CCEind;
+ dci_ind->dci_list[dci_ind->number_of_dcis].N_CCE = L;
dci_ind->dci_list[dci_ind->number_of_dcis].dci_format = rel15->dci_format_options[k];
dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
index c7bf459f6f..319f66eedc 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
@@ -440,7 +440,8 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
}
}
- if ((intraSlotFrequencyHopping == 1) && (l<floor(nrofSymbols/2))) { // intra-slot hopping enabled, we need to calculate new offset PRB
+ //if ((intraSlotFrequencyHopping == 1) && (l<floor(nrofSymbols/2))) { // intra-slot hopping enabled, we need to calculate new offset PRB
+ if ((intraSlotFrequencyHopping == 1) && (l>=floor(nrofSymbols/2))) { // intra-slot hopping enabled, we need to calculate new offset PRB
startingPRB = startingPRB + startingPRB_intraSlotHopping;
}
diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h
index fa021ffe81..4459384e8e 100644
--- a/openair1/PHY/impl_defs_top.h
+++ b/openair1/PHY/impl_defs_top.h
@@ -272,13 +272,13 @@
#define NB_NUMEROLOGIES_NR (5)
#define TDD_CONFIG_NB_FRAMES (2)
#define NR_MAX_SLOTS_PER_FRAME (160) /* number of slots per frame */
-#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (6) /* FFS_NR_TODO it defines ue capability which is the number of slots */
+#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (4) /* FFS_NR_TODO it defines ue capability which is the number of slots */
/* - between reception of pdsch and tarnsmission of its acknowlegment */
/* - between reception of un uplink grant and its related transmission */
#ifndef NO_RAT_NR
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX) /* for NR this will certainly depends to such UE capability which is not yet defined */
#else
- #define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
+ #define DURATION_RX_TO_TX (4) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
#endif
diff --git a/openair1/PHY/phy_extern_nr_ue.h b/openair1/PHY/phy_extern_nr_ue.h
index f1704a7902..95a6a30497 100644
--- a/openair1/PHY/phy_extern_nr_ue.h
+++ b/openair1/PHY/phy_extern_nr_ue.h
@@ -56,6 +56,11 @@ extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
+extern int global_slot_rx;
+extern int global_frame_rx;
+
+
+
extern int flagMag;
//extern short **txdataF_rep_tmp;
diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
index c276de847d..de2e5b0452 100644
--- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
@@ -120,6 +120,10 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
dlsch0_harq->rvidx = dlsch_config_pdu->rv;
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id;
+
+ dlsch0_harq->harq_ack.n_CCE = dlsch_config_pdu->n_CCE;
+ dlsch0_harq->harq_ack.N_CCE = dlsch_config_pdu->N_CCE;
+
dlsch0_harq->harq_ack.slot_for_feedback_ack = (slot+dlsch_config_pdu->pdsch_to_harq_feedback_time_ind)%frame_parms.slots_per_frame;
dlsch0_harq->Nl=1;
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index a63829419a..1650b31beb 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -44,7 +44,7 @@
#include <common/utils/nr/nr_common.h>
#ifndef NO_RAT_NR
-
+#include "PHY/phy_extern_nr_ue.h"
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR_UE/harq_nr.h"
#include "SCHED_NR_UE/pucch_power_control_ue_nr.h"
@@ -419,6 +419,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
NR_PUCCH_Resource_t *pucch_resource = NULL;
+ NR_PUCCH_Config_t *pucch_Config;
uint16_t crnti = mac->crnti;
NR_BWP_Id_t bwp_id = mac->UL_BWP_Id;
@@ -529,6 +530,12 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
}
+ if (O_ACK > 0)
+ LOG_I(PHY, "frame %d %d (%d %d), pucch bits O_SR %d, O_ACK %d, O_CSI %d, pucch_resource_set %d, pucch_resource_id %d, bwp id %d\n", frame_tx, nr_slot_tx,
+ global_frame_rx, global_slot_rx,
+ O_SR, O_ACK, O_CSI, pucch_resource_set, pucch_resource_id, mac->UL_BWP_Id);
+
+
N_UCI = O_SR + O_ACK + O_CSI;
if (N_UCI ==0) return(TRUE);
@@ -594,6 +601,14 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
NR_TST_PHY_PRINTF("PUCCH common configuration with index %d \n", initial_pucch_id);
startingPRB += BWPstart;
secondHopPRB += BWPstart;
+
+ LOG_I(PHY, "came here: pucch_resource_id %d, format %d, nb_symbols_total %d, starting_symbol_index %d, startingPRB %d, secondHopPRB %d, nCCE %d, NCCE %d, pucch ind %d, m_0 %d\n",
+ pucch_resource_id, format, nb_symbols_total, starting_symbol_index, startingPRB, secondHopPRB, harq_status->n_CCE, harq_status->N_CCE, harq_status->pucch_resource_indicator, m_0);
+
+ startingPRB = 0;
+ secondHopPRB = 105;
+ m_0 = 0;
+
}
/* use dedicated pucch resource configuration */
/**********************************************/
@@ -614,7 +629,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
LOG_E(PHY,"PUCCH Unsupported code block group for serving cell config : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
return(FALSE);
}
- NR_PUCCH_Config_t *pucch_Config;
+ //NR_PUCCH_Config_t *pucch_Config;
if (bwp_id>0 &&
mac->ULbwp[bwp_id-1] &&
mac->ULbwp[bwp_id-1]->bwp_Dedicated &&
@@ -730,6 +745,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
/* drop CSI report if simultaneous HARQ-ACK/SR and periodic/semi-periodic CSI cannot be transmitted at the same time */
if (format != pucch_format0_nr) {
+#if 0
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1 != NULL) {
//max_code_rate = code_rate_r_time_100[mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1->choice.setup->maxCodeRate[0]]; /* it is code rate * 10 */
@@ -739,7 +755,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
csi_payload = 0; /* csi should be dropped in this case */
}
}
-
+#endif
/* TS 38.212 6.3.1.2 Code block segmentation and CRC attachment */
/* crc attachment can be done depending of payload size */
// if (N_UCI < 11) {
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
index 6bb7970be6..5d46a6991b 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
@@ -268,6 +268,8 @@ typedef struct {
uint8_t short_messages_indicator; //2 bits
uint8_t short_messages; //8 bits
uint8_t tb_scaling; //2 bits
+ uint8_t n_CCE;
+ uint8_t N_CCE;
uint8_t pucch_resource_indicator; //3 bits
uint8_t system_info_indicator; //1 bit
uint8_t ulsch_indicator;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 1854925b21..6af95c9f1b 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -745,6 +745,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
//if (dci->pucch_resource_indicator == 6) dlsch_config_pdu_1_0->pucch_resource_id = 7; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!!
//if (dci->pucch_resource_indicator == 7) dlsch_config_pdu_1_0->pucch_resource_id = 8; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!!
dlsch_config_pdu_1_0->pucch_resource_id = dci->pucch_resource_indicator;
+ dlsch_config_pdu_1_0->n_CCE = dci->n_CCE;
+ dlsch_config_pdu_1_0->N_CCE = dci->N_CCE;
+
// Sanity check for pucch_resource_indicator value received to check for false DCI.
valid = 0;
if (mac->ULbwp[0] &&
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index b11f3b8574..fe4526908d 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -984,7 +984,8 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
currentPtrDCI);
n_rnti = rel15->rnti;
- if ((proc->nr_slot_rx == 11) || (proc->nr_slot_rx == 0))
+ //if ((proc->nr_slot_rx == 11) || (proc->nr_slot_rx == 0))
+ if ((rel15->rnti != 0xFFFF ) && (rel15->rnti != 0x10b))
LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d, L %d, payloadSize %d), scramble rnti %d, scramble id %d, crc %d\n",
proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind, L, dci_length, rel15->coreset.scrambling_rnti, rel15->coreset.pdcch_dmrs_scrambling_id, crc);
if (crc == n_rnti) {
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index 1356d451a6..c25b713038 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -195,7 +195,23 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
- rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
+ // rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
+
+ rel15->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
+ rel15->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
+ rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
+
+
+ rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
+ LOG_D(PHY, "ss_id %d, ra rnti bwp %d %d, dci len %d freqsource 0x %2x %2x %2x %2x %2x %2x\n", ss_id, rel15->BWPStart, rel15->BWPSize, rel15->dci_length_options[0],
+ rel15->coreset.frequency_domain_resource[0],
+ rel15->coreset.frequency_domain_resource[1],
+ rel15->coreset.frequency_domain_resource[2],
+ rel15->coreset.frequency_domain_resource[3],
+ rel15->coreset.frequency_domain_resource[4],
+ rel15->coreset.frequency_domain_resource[5]);
+
+
break;
case NR_RNTI_SP_CSI:
break;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index d45505f2c9..347713bc81 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -668,7 +668,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
pdsch_config = NULL;
}
}
- LOG_I(MAC, "rar : bwp %d %d\n", dlsch_config_pdu_1_0->BWPStart, dlsch_config_pdu_1_0->BWPSize);
+ LOG_I(MAC, "rar : bwp %d %d, bwpsize %d, riv %d\n", dlsch_config_pdu_1_0->BWPStart, dlsch_config_pdu_1_0->BWPSize, BWPSize, dci->frequency_domain_assignment.val);
/* IDENTIFIER_DCI_FORMATS */
/* FREQ_DOM_RESOURCE_ASSIGNMENT_DL */
if (nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,0,BWPSize,dci->frequency_domain_assignment.val) < 0) {
@@ -1432,6 +1432,7 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
if (mac->DLbwp[0]) N_RB=NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
else N_RB=NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+ N_RB = mac->type0_PDCCH_CSS_config.num_rbs;
// indicating a DL DCI format - 1 bit
pos++;
dci_pdu_rel15->format_indicator = (*dci_pdu>>(dci_size-pos))&1;
@@ -1484,20 +1485,20 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
pos+=3;
dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val = (*dci_pdu>>(dci_size-pos))&7;
- LOG_D(NR_MAC,"N_RB = %i\n", N_RB);
- LOG_D(NR_MAC,"dci_size = %i\n", dci_size);
- LOG_D(NR_MAC,"fsize = %i\n", fsize);
- LOG_D(NR_MAC,"dci_pdu_rel15->format_indicator = %i\n", dci_pdu_rel15->format_indicator);
- LOG_D(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val);
- LOG_D(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val);
- LOG_D(NR_MAC,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val);
- LOG_D(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs);
- LOG_D(NR_MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv);
- LOG_D(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid);
- LOG_D(NR_MAC,"dci_pdu_rel15->dai[0].val = %i\n", dci_pdu_rel15->dai[0].val);
- LOG_D(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc);
- LOG_D(NR_MAC,"dci_pdu_rel15->pucch_resource_indicator = %i\n", dci_pdu_rel15->pucch_resource_indicator);
- LOG_D(NR_MAC,"dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val = %i\n", dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val);
+ LOG_I(NR_MAC,"N_RB = %i\n", N_RB);
+ LOG_I(NR_MAC,"dci_size = %i\n", dci_size);
+ LOG_I(NR_MAC,"fsize = %i\n", fsize);
+ LOG_I(NR_MAC,"dci_pdu_rel15->format_indicator = %i\n", dci_pdu_rel15->format_indicator);
+ LOG_I(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val);
+ LOG_I(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val);
+ LOG_I(NR_MAC,"dci_pdu_rel15->vrb_to_prb_mapping.val = %i\n", dci_pdu_rel15->vrb_to_prb_mapping.val);
+ LOG_I(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs);
+ LOG_I(NR_MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv);
+ LOG_I(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid);
+ LOG_I(NR_MAC,"dci_pdu_rel15->dai[0].val = %i\n", dci_pdu_rel15->dai[0].val);
+ LOG_I(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc);
+ LOG_I(NR_MAC,"dci_pdu_rel15->pucch_resource_indicator = %i\n", dci_pdu_rel15->pucch_resource_indicator);
+ LOG_I(NR_MAC,"dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val = %i\n", dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val);
break;
}
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index 83366a4b27..b861a6e6a1 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -187,6 +187,13 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[0]], rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
+
+
+ rel15->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
+ rel15->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
+ rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
+ rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[0]], rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
+
break;
case NR_RNTI_SP_CSI:
break;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 4e67fa9a54..1854925b21 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -1463,6 +1463,7 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
// check BWP id
if (mac->DLbwp[0]) N_RB=NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
else N_RB=NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+ N_RB = mac->type0_PDCCH_CSS_config.num_rbs;
// indicating a DL DCI format - 1 bit
pos++;
diff --git a/openair2/RRC/LTE/rrc_defs.h b/openair2/RRC/LTE/rrc_defs.h
index 1c02c3de46..6a67194ac4 100644
--- a/openair2/RRC/LTE/rrc_defs.h
+++ b/openair2/RRC/LTE/rrc_defs.h
@@ -496,7 +496,7 @@ typedef struct MEASUREMENT_INFO_s {
typedef struct {
char Payload[RRC_BUFFER_SIZE_MAX];
char Header[RRC_HEADER_SIZE_MAX];
- char payload_size;
+ uint16_t payload_size;
} RRC_BUFFER;
#define RRC_BUFFER_SIZE sizeof(RRC_BUFFER)
diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c
index cb8eca9504..8937b70138 100644
--- a/openair2/RRC/NR_UE/rrc_UE.c
+++ b/openair2/RRC/NR_UE/rrc_UE.c
@@ -1325,11 +1325,13 @@ static void rrc_ue_generate_RRCSetupComplete(
int nas_msg_length;
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
+#if 0
if (mac->cg &&
mac->cg->spCellConfig &&
mac->cg->spCellConfig->spCellConfigDedicated &&
mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig)
AssertFatal(1==0,"2 > csi_MeasConfig is not null\n");
+#endif
if (AMF_MODE_ENABLED) {
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
@@ -1389,7 +1391,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
&asn_DEF_NR_DL_CCCH_Message,
(void **)&dl_ccch_msg,
(uint8_t *)Srb_info->Rx_buffer.Payload,
- 100,0,0);
+ 1000,0,0);
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout,&asn_DEF_NR_DL_CCCH_Message,(void *)dl_ccch_msg);
diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
index 8b3cb6eec0..7456b4cb28 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
@@ -463,6 +463,8 @@ typedef struct {
double scaling_factor_S;
int8_t accumulated_delta_PUCCH;
uint8_t pucch_resource_id;
+ uint8_t n_CCE;
+ uint8_t N_CCE;
uint8_t pdsch_to_harq_feedback_time_ind;
uint8_t n_dmrs_cdm_groups;
uint8_t dmrs_ports[10];
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index fe4526908d..712aff2f58 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -995,6 +995,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
dci_ind->slot = proc->nr_slot_rx;
dci_ind->dci_list[dci_ind->number_of_dcis].rnti = n_rnti;
dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE = CCEind;
+ dci_ind->dci_list[dci_ind->number_of_dcis].N_CCE = L;
dci_ind->dci_list[dci_ind->number_of_dcis].dci_format = rel15->dci_format_options[k];
dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
index fe3d25b6f7..7aa6e91825 100644
--- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
@@ -120,6 +120,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
dlsch0_harq->rvidx = dlsch_config_pdu->rv;
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id;
+ dlsch0_harq->harq_ack.n_CCE = dlsch_config_pdu->n_CCE;
+ dlsch0_harq->harq_ack.N_CCE = dlsch_config_pdu->N_CCE;
dlsch0_harq->harq_ack.slot_for_feedback_ack = (slot+dlsch_config_pdu->pdsch_to_harq_feedback_time_ind)%frame_parms.slots_per_frame;
dlsch0_harq->Nl=1;
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 51f01fcf4c..cee5554653 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -2120,7 +2120,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
LOG_D(PHY, "In %s: [UE %d] RA waiting contention resolution\n", __FUNCTION__, mod_id);
ue->UE_mode[gNB_id] = RA_WAIT_CR;
} else if (nr_prach == RA_SUCCEEDED) {
- LOG_D(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id);
+ LOG_I(PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id);
ue->UE_mode[gNB_id] = PUSCH;
} else if(nr_prach == RA_FAILED){
LOG_D(PHY, "In %s: [UE %d] RA failed, setting UE mode to PRACH\n", __FUNCTION__, mod_id);
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index 865d0326cc..87c27765c6 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -419,6 +419,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
NR_PUCCH_Resource_t *pucch_resource;
+ NR_PUCCH_Config_t *pucch_Config;
+
uint16_t crnti = mac->crnti;
NR_BWP_Id_t bwp_id = mac->UL_BWP_Id;
@@ -528,6 +530,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
}
+ if (O_ACK > 0)
+ LOG_I(PHY, "pucch bits O_SR %d, O_ACK %d, O_CSI %d, pucch_resource_set %d, pucch_resource_id %d, bwp id %d\n", O_SR, O_ACK, O_CSI, pucch_resource_set, pucch_resource_id, mac->UL_BWP_Id);
N_UCI = O_SR + O_ACK + O_CSI;
if (N_UCI ==0) return(TRUE);
@@ -600,6 +604,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
/**********************************************/
else if ((pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) && (pucch_resource_id != MAX_NB_OF_PUCCH_RESOURCES)) {
/* check that current configuration is supported */
+ LOG_I(PHY, "came here\n");
if (mac->cg &&
mac->cg->physicalCellGroupConfig &&
(mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL ||
@@ -616,7 +621,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
LOG_E(PHY,"PUCCH Unsupported code block group for serving cell config : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
return(FALSE);
}
- NR_PUCCH_Config_t *pucch_Config;
+ //NR_PUCCH_Config_t *pucch_Config;
if (bwp_id>0 &&
mac->ULbwp[bwp_id-1] &&
mac->ULbwp[bwp_id-1]->bwp_Dedicated &&
@@ -643,6 +648,9 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
starting_symbol_index = get_starting_symb_idx(pucch_resource, format);
startingPRB = BWPstart + pucch_resource->startingPRB;
secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? (BWPstart+*pucch_resource->secondHopPRB) : startingPRB;
+
+ LOG_I(PHY, "came here: pucch_resource_id %d, format %d, nb_symbols_total %d, starting_symbol_index %d, startingPRB %d, secondHopPRB %d\n",
+ pucch_resource_id, format, nb_symbols_total, starting_symbol_index, startingPRB, secondHopPRB);
if (format==pucch_format1_nr)
time_domain_occ = pucch_resource->format.choice.format1->timeDomainOCC;
if (format==pucch_format4_nr) {
@@ -683,9 +691,11 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int O_CRC = 0;
nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */
- pucch_resource = format>1 ?
- mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id]:
- 0;
+ //pucch_resource = format>1 ?
+ // mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id]:
+ // 0;
+
+ AssertFatal(pucch_resource!=NULL,"PUCCH No compatible pucch format found : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
switch(format) {
case pucch_format0_nr:
@@ -733,16 +743,21 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
/* TS 38.213 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR and CSI */
/* drop CSI report if simultaneous HARQ-ACK/SR and periodic/semi-periodic CSI cannot be transmitted at the same time */
+ AssertFatal(pucch_Config!=NULL,"PUCCH No compatible pucch format found : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
+ LOG_I(PHY, "came here 2\n");
if (format != pucch_format0_nr) {
-
- if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1 != NULL) {
+ if (pucch_Config->format1->choice.setup != NULL){
+ #if 0
+ //if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1 != NULL) {
//max_code_rate = code_rate_r_time_100[mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1->choice.setup->maxCodeRate[0]]; /* it is code rate * 10 */
- if ((O_ACK != 0) && (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1->choice.setup->simultaneousHARQ_ACK_CSI[0] == 0)) {
+ //if ((O_ACK != 0) && (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1->choice.setup->simultaneousHARQ_ACK_CSI[0] == 0)) {
+ if ((O_ACK != 0) && (pucch_Config->format1->choice.setup->simultaneousHARQ_ACK_CSI[0] == 0)) {
N_UCI = N_UCI - O_CSI;
O_CSI = cqi_status = ri_status = 0;
csi_payload = 0; /* csi should be dropped in this case */
}
+ #endif
}
/* TS 38.212 6.3.1.2 Code block segmentation and CRC attachment */
@@ -756,7 +771,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
// else if (N_UCI >= 20) {
// O_CRC = 11; /* number of additional crc bits */
// }
-
+ LOG_I(PHY, "came here 3, N_UCI %d, O_CRC %d\n", N_UCI, O_CRC);
N_UCI = N_UCI + O_CRC;
/* for format 2 and 3, number of prb should be adjusted to minimum value which cope to information size */
@@ -859,7 +874,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
#else
tx_amp = AMP;
#endif
-
+ LOG_I(PHY, "came here 4\n");
switch(format) {
case pucch_format0_nr:
{
@@ -1216,6 +1231,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
if (ue->UE_mode[gNB_id] != PUSCH) {
*initial_pucch_id = *mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->pucch_ResourceCommon;
+ LOG_I(PHY, "no dedicated, no PUSCH mode %d\n", *initial_pucch_id);
if (*initial_pucch_id >= NB_INITIAL_PUCCH_RESOURCE) {
LOG_E(PHY,"PUCCH Invalid initial resource index : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
*initial_pucch_id = NB_INITIAL_PUCCH_RESOURCE;
@@ -1236,10 +1252,12 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
}
int r_PUCCH = ((2 * n_CCE_0)/N_CCE_0) + (2 * delta_PRI);
*initial_pucch_id = r_PUCCH;
+ LOG_I(PHY, "no dedicated, PUSCH mode %d, delta_PRI %d, n_CCE_0 %d, N_CCE_0 %d\n", *initial_pucch_id, delta_PRI, n_CCE_0, N_CCE_0);
}
nb_symbols_for_tx = initial_pucch_resource[*initial_pucch_id].nrofSymbols;
format_pucch = initial_pucch_resource[*initial_pucch_id].format;
if (check_pucch_format(mac, gNB_id, format_pucch, nb_symbols_for_tx, uci_size) == TRUE) {
+ LOG_I(PHY, "no dedicated, check_pucch_format ok, nb_symbols_for_tx %d, format_pucch %d\n", *initial_pucch_id, nb_symbols_for_tx, format_pucch);
return (TRUE);
}
else {
@@ -1263,11 +1281,14 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
if (pucch_resource_set_id != MAX_NB_OF_PUCCH_RESOURCE_SETS) {
resource_set_found = TRUE;
}
+
+ LOG_I(PHY, "dedicated: resource_set_found %d, pucch_resource_set_id %d, pucch_resource_indicator %d", resource_set_found, pucch_resource_set_id, pucch_resource_indicator);
}
else {
/* a valid resource has already be found outside this function */
resource_set_found = TRUE;
ready_pucch_resource_id = TRUE;
+ LOG_I(PHY, "dedicated: set outside, resource_set_found %d, pucch_resource_set_id %d, pucch_resource_indicator %d", resource_set_found, pucch_resource_set_id, pucch_resource_indicator);
//pucch_resource_indicator = pucch_resource_indicator;
}
@@ -1320,6 +1341,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
}
else {
current_resource_id = resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.array[pucch_resource_indicator][0];
+ LOG_I(PHY, "current_resource_id %d\n", current_resource_id);
}
}
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
index ba12d9c5c3..d5c85a6c73 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
@@ -268,6 +268,8 @@ typedef struct {
uint8_t short_messages_indicator; //2 bits
uint8_t short_messages; //8 bits
uint8_t tb_scaling; //2 bits
+ uint8_t n_CCE;
+ uint8_t N_CCE;
uint8_t pucch_resource_indicator; //3 bits
uint8_t system_info_indicator; //1 bit
uint8_t ulsch_indicator;
diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c
index 32226a4ea6..a5cffbcffe 100755
--- a/openair2/LAYER2/NR_MAC_UE/config_ue.c
+++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c
@@ -595,6 +595,7 @@ void config_control_ue(NR_UE_MAC_INST_t *mac){
uint8_t coreset_id = 1, ss_id;
+ LOG_I(MAC, "config_control_ue\n");
NR_ServingCellConfig_t *scd = mac->cg->spCellConfig->spCellConfigDedicated;
AssertFatal(scd->downlinkBWP_ToAddModList != NULL, "downlinkBWP_ToAddModList is null\n");
AssertFatal(scd->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList->list->count is %d\n", scd->downlinkBWP_ToAddModList->list.count);
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 45515fc74e..c64c5173d0 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -732,6 +732,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
//if (dci->pucch_resource_indicator == 6) dlsch_config_pdu_1_0->pucch_resource_id = 7; //pucch-ResourceId obtained from the 7th value of resourceList FIXME!!
//if (dci->pucch_resource_indicator == 7) dlsch_config_pdu_1_0->pucch_resource_id = 8; //pucch-ResourceId obtained from the 8th value of resourceList FIXME!!
dlsch_config_pdu_1_0->pucch_resource_id = dci->pucch_resource_indicator;
+ dlsch_config_pdu_1_0->n_CCE = dci->n_CCE;
+ dlsch_config_pdu_1_0->N_CCE = dci->N_CCE;
// Sanity check for pucch_resource_indicator value received to check for false DCI.
valid = 0;
if (mac->ULbwp[0] &&
diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c
index c8b620887c..535ffb2715 100644
--- a/openair2/RRC/NR_UE/rrc_UE.c
+++ b/openair2/RRC/NR_UE/rrc_UE.c
@@ -2437,7 +2437,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti,
ITTI_MSG_NAME (msg_p),
NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame,
- NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index,
+ NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index,
NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size);
srb_info_p = &NR_UE_rrc_inst[ue_mod_id].Srb0[NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index];
memcpy (srb_info_p->Rx_buffer.Payload, NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu,
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index 8891d3354e..83366a4b27 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -168,6 +168,9 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
} else { // NSA mode is not using the Initial BWP
rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
}
+ rel15->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
+ rel15->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
+
rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
rel15->dci_length_options[0] = nr_dci_size(initialUplinkBWP, mac->cg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[0]], rel15->dci_format_options[0], NR_RNTI_RA, rel15->BWPSize, bwp_id);
break;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 2bac03fc4f..4e67fa9a54 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -648,6 +648,12 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup;
BWPSize = dlsch_config_pdu_1_0->BWPSize;
}
+ dlsch_config_pdu_1_0->BWPSize = mac->type0_PDCCH_CSS_config.num_rbs;
+ dlsch_config_pdu_1_0->BWPStart = mac->type0_PDCCH_CSS_config.cset_start_rb;
+ dlsch_config_pdu_1_0->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon;
+ if (pdsch_config) pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; // For PDSCH with mapping type A, the UE shall assume dmrs-AdditionalPosition='pos2'
+ BWPSize = dlsch_config_pdu_1_0->BWPSize;
+
} else if (mac->DLbwp[0]) {
dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
@@ -1219,6 +1225,10 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
} else {
N_RB = get_n_rb(mac, rnti_type);
}
+ N_RB = mac->type0_PDCCH_CSS_config.num_rbs;
+ // Freq domain assignment 0-16 bit
+ fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
+ pos+=fsize;
// Freq domain assignment
fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) );
pos=fsize;
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 27bc569517..d03ff0ae70 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -754,9 +754,9 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
avgs = cmax(avgs, avgP[aarx]);
log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx;
-#ifdef UE_DEBUG_TRACE
- LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
-#endif
+//#ifdef UE_DEBUG_TRACE
+ LOG_I(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
+//#endif
#if T_TRACER
T(T_UE_PHY_PDCCH_ENERGY, T_INT(0), T_INT(0), T_INT(frame%1024), T_INT(slot),
T_INT(avgP[0]), T_INT(avgP[1]), T_INT(avgP[2]), T_INT(avgP[3]));
@@ -797,6 +797,17 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
}
LOG_D(PHY,"we enter nr_pdcch_demapping_deinterleaving()\n");
+ LOG_I(PHY, "pdcch : dur %d nrb %d, RegBundleSize %d, InterleaverSize %d, ShiftIndex %d, number_of_candidates %d, CCE %d, L %d\n",
+ rel15->coreset.duration,
+ n_rb,
+ rel15->coreset.RegBundleSize,
+ rel15->coreset.InterleaverSize,
+ rel15->coreset.ShiftIndex,
+ rel15->number_of_candidates,
+ rel15->CCE,
+ rel15->L
+ );
+
nr_pdcch_demapping_deinterleaving((uint32_t *) pdcch_vars->llr,
(uint32_t *) pdcch_vars->e_rx,
rel15->coreset.duration,
@@ -928,7 +939,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
currentPtrDCI);
n_rnti = rel15->rnti;
- LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length);
+ LOG_I(PHY, " (%i.%i) dci indication %d (rnti %x,dci format %s,n_CCE %d,payloadSize %d, L %d)\n", proc->frame_rx, proc->nr_slot_rx, i, n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length, L);
if (crc == n_rnti) {
LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)\n",
proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length,*(unsigned long long*)dci_estimation);
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
index 7004cf7aaf..c800fd24c8 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
@@ -3340,8 +3340,8 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
break;
}
- LOG_D(MAC,"Coreset0: index_4msb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d\n",
- index_4msb,type0_PDCCH_CSS_config->num_rbs,type0_PDCCH_CSS_config->num_symbols,type0_PDCCH_CSS_config->rb_offset );
+ LOG_I(MAC,"Coreset0: index_4msb=%d, index_4lsb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d\n",
+ index_4msb, index_4lsb, type0_PDCCH_CSS_config->num_rbs,type0_PDCCH_CSS_config->num_symbols,type0_PDCCH_CSS_config->rb_offset );
AssertFatal(type0_PDCCH_CSS_config->num_rbs != -1, "Type0 PDCCH coreset num_rbs undefined");
AssertFatal(type0_PDCCH_CSS_config->num_symbols != -1, "Type0 PDCCH coreset num_symbols undefined");
@@ -3534,7 +3534,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
type0_PDCCH_CSS_config->n_0 = ((uint32_t)(big_o*(1<<scs_pdcch)) + (uint32_t)(type0_PDCCH_CSS_config->ssb_index*big_m))%num_slot_per_frame;
type0_PDCCH_CSS_config->cset_start_rb = ssb_offset_point_a - type0_PDCCH_CSS_config->rb_offset;
-
+ LOG_I(MAC, "SIB1 cset_start_rb %d, sfn_c %d, n_0 %d", type0_PDCCH_CSS_config->cset_start_rb, type0_PDCCH_CSS_config->sfn_c, type0_PDCCH_CSS_config->n_c);
}
/* extract UL PTRS values from RRC and validate it based upon 38.214 6.2.3 */
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 06f62abbf6..cc57fee667 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -884,7 +884,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
config_dci_pdu(mac, rel15, dl_config, NR_RNTI_SI, -1);
fill_dci_search_candidates(ss0, rel15);
dl_config->number_pdus = 1;
- LOG_D(NR_MAC,"Calling fill_scheduled_response, type0_pdcch, num_pdus %d\n",dl_config->number_pdus);
+ LOG_I(NR_MAC,"frame %d %d Calling fill_scheduled_response, type0_pdcch, num_pdus %d\n", rx_frame, rx_slot, dl_config->number_pdus );
fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->thread_id);
if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL)
mac->if_module->scheduled_response(&scheduled_response);
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index 1650b31beb..2d297242f9 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -412,6 +412,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int initial_pucch_id = NB_INITIAL_PUCCH_RESOURCE;
int pucch_resource_set = MAX_NB_OF_PUCCH_RESOURCE_SETS;
int pucch_resource_id = MAX_NB_OF_PUCCH_RESOURCES;
+ int pucch_resource_id_sr = MAX_NB_OF_PUCCH_RESOURCES;
int pucch_resource_indicator = MAX_PUCCH_RESOURCE_INDICATOR;
int n_HARQ_ACK;
@@ -444,7 +445,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
sr_payload = 0;
- if (trigger_periodic_scheduling_request( ue, gNB_id, proc ) == 1) {
+ if (trigger_periodic_scheduling_request( ue, gNB_id, proc, &pucch_resource_id_sr ) == 1) {
O_SR = 1; /* sr should be transmitted */
if (ue->mac_enabled == 1) {
@@ -455,6 +456,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
gNB_id,
0,//ue->pdcch_vars[proc->thread_id][gNB_id]->crnti,
nr_slot_tx); // nr_slot_rx used for meas gap
+ LOG_D(PHY, "sr: frame %d %d, sr payload %d\n", frame_tx, nr_slot_tx, sr_payload);
}
else {
sr_payload = 1;
@@ -501,6 +503,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
else {
/* a resource set and a resource should be find according to payload size */
+ #if 0
pucch_resource_set = find_pucch_resource_set( mac, gNB_id, N_UCI);
if (pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) {
pucch_resource_indicator = 0;
@@ -512,25 +515,27 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
O_CSI = 0;
csi_payload = 0;
}
+#endif
if (O_CSI == 0) {
/* only SR has to be send */
/* in this case there is no DCI related to PUCCH parameters so pucch resource should be get from sr configuration */
/* TS 38.213 9.2.4 UE procedure for reporting SR */
- pucch_resource_set = 0; /* force it to a valid value */
- if (ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[ue->scheduling_request_config_nr[gNB_id].active_sr_id] != NULL) {
- pucch_resource_id = ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[ue->scheduling_request_config_nr[gNB_id].active_sr_id]->resource;
- }
- else {
- LOG_E(PHY,"PUCCH No scheduling request configuration : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
- return(FALSE);
+ pucch_resource_set = 1; /* force it to a valid value */
+ pucch_resource_id = pucch_resource_id_sr;
+ //if (ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[ue->scheduling_request_config_nr[gNB_id].active_sr_id] != NULL) {
+ // pucch_resource_id = ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[ue->scheduling_request_config_nr[gNB_id].active_sr_id]->resource;
+ //}
+ //else {
+ // LOG_E(PHY,"PUCCH No scheduling request configuration : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
+ // return(FALSE);
}
- }
+
}
}
}
- if (O_ACK > 0)
+ if (N_UCI > 0)
LOG_I(PHY, "frame %d %d (%d %d), pucch bits O_SR %d, O_ACK %d, O_CSI %d, pucch_resource_set %d, pucch_resource_id %d, bwp id %d\n", frame_tx, nr_slot_tx,
global_frame_rx, global_slot_rx,
O_SR, O_ACK, O_CSI, pucch_resource_set, pucch_resource_id, mac->UL_BWP_Id);
@@ -664,6 +669,9 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
m_0 = get_ics_pucch(pucch_resource, format);
+ LOG_D(PHY, "came here4: pucch_resource_id %d, format %d, nb_symbols_total %d, starting_symbol_index %d, startingPRB %d, secondHopPRB %d, nCCE %d, NCCE %d, pucch ind %d, m_0 %d\n",
+ pucch_resource_id, format, nb_symbols_total, starting_symbol_index, startingPRB, secondHopPRB, harq_status->n_CCE, harq_status->N_CCE, harq_status->pucch_resource_indicator, m_0);
+
AssertFatal(m_0 >= 0, "Invalid m_0\n");
if (format == pucch_format3_nr) {
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format3->choice.setup->additionalDMRS[0] == 1) {
@@ -899,6 +907,17 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
case pucch_format1_nr:
{
+ LOG_D(PHY, "pucch1: slot %d, m0 %d, symbols %d, %d, prb %d, %d, occ %d, NUCI %d, payload %d\n",
+ nr_slot_tx,
+ (uint8_t)m_0,
+ nb_symbols_total,
+ starting_symbol_index,
+ startingPRB,
+ secondHopPRB,
+ (uint8_t)time_domain_occ,
+ (uint8_t)N_UCI,
+ pucch_payload
+ );
nr_generate_pucch1(ue,ue->common_vars.txdataF,
&ue->frame_parms,
&ue->pucch_config_dedicated[gNB_id],
@@ -1201,6 +1220,9 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
//*resource_set_id = MAX_NB_OF_PUCCH_RESOURCE_SETS;
//*resource_id = MAX_NB_OF_PUCCH_RESOURCES;
+ if ((*resource_id != MAX_NB_OF_PUCCH_RESOURCES) && (*resource_set_id != MAX_NB_OF_PUCCH_RESOURCE_SETS))
+ return TRUE;
+
if ((bwp_id ==0 &&
mac->cg == NULL) ||
(bwp_id == 0 &&
@@ -1546,45 +1568,115 @@ boolean_t check_pucch_format(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, pucch_format
*
*********************************************************************/
-int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc)
+void periodicity__SRR (NR_SchedulingRequestResourceConfig_t *SchedulingReqRec, int *period, int *offset)
{
- const int max_sr_periodicity[NB_NUMEROLOGIES_NR] = { 80, 160, 320, 640, 640 };
-
- int active_scheduling_request = ue->scheduling_request_config_nr[gNB_id].active_sr_id;
+ NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR P_O = SchedulingReqRec->periodicityAndOffset->present;
- /* is there any valid scheduling request configuration */
- if (ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[active_scheduling_request] == NULL) {
- return (0);
+ switch (P_O){
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl1:
+ *period = 1;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl1;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl2:
+ *period = 2;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl2;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl4:
+ *period = 4;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl4;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl5:
+ *period = 5;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl5;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl8:
+ *period = 8;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl8;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10:
+ *period = 10;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl10;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl16:
+ *period = 16;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl16;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl20:
+ *period = 20;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl20;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40:
+ *period = 40;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl40;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl80:
+ *period = 80;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl80;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl160:
+ *period = 160;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl160;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320:
+ *period = 320;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl320;
+ break;
+ case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640:
+ *period = 640;
+ *offset = SchedulingReqRec->periodicityAndOffset->choice.sl640;
+ break;
+ default:
+ AssertFatal(1==0,"No periodicityAndOffset resources found in schedulingrequestresourceconfig");
}
+ LOG_D(PHY, "P_O %d, period %d offset %d\n", P_O, *period, *offset);
- if (ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[active_scheduling_request]->periodicity < 2) {
- LOG_W(PHY,"PUCCH Not supported scheduling request period smaller than 1 slot : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
- return (0);
- }
+}
- int16_t SR_periodicity = scheduling_request_periodicity[ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[active_scheduling_request]->periodicity];
- uint16_t SR_offset = ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[active_scheduling_request]->offset;
- if (SR_periodicity > max_sr_periodicity[ue->frame_parms.numerology_index]) {
- LOG_W(PHY,"PUCCH Invalid scheduling request period : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
- return (0);
- }
- if (SR_offset > SR_periodicity) {
- LOG_E(PHY,"PUCCH SR offset %d is greater than SR periodicity %d : at line %d in function %s of file %s \n", SR_offset, SR_periodicity, LINE_FILE , __func__, FILE_NAME);
- return (0);
- }
- else if (SR_periodicity == 1) {
- return (1); /* period is slot */
- }
+int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc, int *pucch_resource_id)
+{
+ NR_PUCCH_Config_t *pucch_Config = NULL;
+ int SR_period; int SR_offset;
+ int bwp_id = 0;
+ NR_UE_MAC_INST_t *mac = get_mac_inst(0);
+ if (bwp_id>0 &&
+ mac->ULbwp[bwp_id-1] &&
+ mac->ULbwp[bwp_id-1]->bwp_Dedicated &&
+ mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config &&
+ mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup)
+ pucch_Config = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup;
+ else if (bwp_id==0 &&
+ mac->cg &&
+ mac->cg->spCellConfig &&
+ mac->cg->spCellConfig->spCellConfigDedicated &&
+ mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig &&
+ mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP &&
+ mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config &&
+ mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) {
+ pucch_Config = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup;
+ AssertFatal(pucch_Config->schedulingRequestResourceToAddModList->list.count>0,"NO SR configuration available");
+ LOG_D(PHY,"pucch rs frame %d %d, rs num %d\n", proc->frame_tx, proc->nr_slot_tx, pucch_Config->schedulingRequestResourceToAddModList->list.count);
+ }
+ if (pucch_Config == NULL)
+ return (0);
+
+ NR_SchedulingRequestResourceConfig_t *SchedulingReqRec = pucch_Config->schedulingRequestResourceToAddModList->list.array[0];
+ periodicity__SRR(SchedulingReqRec, &SR_period,&SR_offset);
+ // convert to int to avoid underflow of uint
+ int sfn_sf = proc->frame_tx * 20 + proc->nr_slot_tx;
+ if ((sfn_sf - SR_offset) % SR_period == 0)
+ {
+ NR_PUCCH_ResourceId_t PucchResourceId = *(SchedulingReqRec->resource);
- int16_t N_slot_frame = ue->frame_parms.slots_per_frame;
- if (((proc->frame_tx * N_slot_frame) + proc->nr_slot_tx - SR_offset)%SR_periodicity == 0) {
- return (1);
- }
- else {
- return (0);
- }
+ *pucch_resource_id = PucchResourceId;
+
+ return (1);
+
+ }
+ else {
+ return (0);
+ }
}
/*******************************************************************
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.h b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
index 97d8d73282..ed00df8b45 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
@@ -121,7 +121,7 @@ boolean_t check_pucch_format(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, pucch_format
@param slots for rx and tx
@returns TRUE a scheduling request is triggered */
-int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc);
+int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc, int *pucch_resource_id);
/** \brief This function reads current CSI
@param ue context
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 6af95c9f1b..57e97315bb 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -1132,6 +1132,25 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
int8_t nr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, uint8_t eNB_id, uint16_t rnti, sub_frame_t subframe){
+
+ //unsigned short post_padding = 0;
+ NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP);
+
+ rlc_buffer_occupancy_t lcid_buffer_occupancy_old = 0;
+
+ AssertFatal(CC_id == 0,
+ "Transmission on secondary CCs is not supported yet\n");
+
+ // Check for DCCH first
+ // TO DO: Multiplex in the order defined by the logical channel prioritization
+ for (int lcid = UL_SCH_LCID_SRB1;
+ lcid < NR_MAX_NUM_LCID; lcid++) {
+
+ lcid_buffer_occupancy_old = mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_id, frameP, subframe, ENB_FLAG_NO, lcid);
+ if (lcid_buffer_occupancy_old > 0)
+ return 1;
+ }
+
return 0;
}
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
cell_type = "CELL_MACRO_GNB";
gNB_name = "gNB-Eurecom-5GNRBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 100;
plmn_list = ({
mcc = 208;
mnc = 93;
mnc_length = 2;
snssaiList = (
{
sst = 1;
sd = 0x010203; // 0 false, else true
},
{
sst = 1;
sd = 0x112233; // 0 false, else true
}
);
});
tr_s_preference = "local_mac"
////////// Physical parameters:
ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641032;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640000;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=41,L=24 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 6366;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#pdsch-ConfigCommon
#pdschTimeDomainAllocationList (up to 16 entries)
initialDLBWPk0_0 = 0;
#initialULBWPmappingType
#0=typeA,1=typeB
initialDLBWPmappingType_0 = 0;
#this is SS=1,L=13
initialDLBWPstartSymbolAndLength_0 = 40;
initialDLBWPk0_1 = 0;
initialDLBWPmappingType_1 = 0;
#this is SS=2,L=12
initialDLBWPstartSymbolAndLength_1 = 53;
initialDLBWPk0_2 = 0;
initialDLBWPmappingType_2 = 0;
#this is SS=1,L=12
initialDLBWPstartSymbolAndLength_2 = 54;
initialDLBWPk0_3 = 0;
initialDLBWPmappingType_3 = 0;
#this is SS=1,L=5
initialDLBWPstartSymbolAndLength_3 = 57;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 6366;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -118;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0 = 6;
initialULBWPmappingType_0 = 1
# this is SS=0 L=11
initialULBWPstartSymbolAndLength_0 = 55;
initialULBWPk2_1 = 6;
initialULBWPmappingType_1 = 1;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1 = 69;
initialULBWPk2_2 = 7;
initialULBWPmappingType_2 = 1;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2 = 52;
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = 10;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "192.168.199.223";
ipv6 = "192:168:199::223";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.199.222/24";
GNB_INTERFACE_NAME_FOR_NGU = "enx000ec6c0a3ac";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.10.100/24";
GNB_PORT_FOR_NGU = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_X2C = "192.168.20.20/24";
GNB_PORT_FOR_X2C = 36422; # Spec 36422
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "type=b200";
#clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
ngap_log_level ="info";
ngap_log_verbosity ="medium";
};
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