Compare commits

...

3 Commits

Author SHA1 Message Date
beraoudabdelkhalek
54a039b350 Fix config files 2025-03-10 10:35:36 +01:00
Karim Boutiba
6fdfdc2dfc add loggin 2025-02-26 15:06:19 +00:00
Karim Boutiba
02226bf919 checkpoint for me to test 2024-05-30 14:31:47 +02:00
12 changed files with 173 additions and 78 deletions

View File

@@ -744,7 +744,7 @@ static radio_tx_gpio_flag_t get_gpio_flags(RU_t *ru, int slot)
int beam = beam_ids[slot * fp->symbols_per_slot];
if (prev_beam != beam) {
flags_gpio = beam | TX_GPIO_CHANGE; // enable change of gpio
LOG_I(HW, "slot %d, beam %d\n", slot, ru->common.beam_id[0][slot * fp->symbols_per_slot]);
LOG_D(HW, "slot %d, beam %d\n", slot, ru->common.beam_id[0][slot * fp->symbols_per_slot]);
}
}
break;

View File

@@ -480,12 +480,13 @@ int main( int argc, char **argv ) {
ue_id_g = (node_number == 0) ? 0 : node_number - 2;
AssertFatal(ue_id_g >= 0, "UE id is expected to be nonnegative.\n");
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa || get_softmodem_params()->nsa) {
if(node_number == 0) {
/*if(node_number == 0) {
init_pdcp(0);
}
else {
init_pdcp(mode_offset + ue_id_g);
}
}*/
init_pdcp(0);
}
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **));

View File

@@ -56,7 +56,7 @@ At runtime, to successfully use hardware acceleration via OpenCL, you need to in
[HW] Device 0 is available
[HW] Device 0, type 2 = 0x00000002: cpu
[HW] Device 0, number of Compute Units: 8
[HW] Device 0, max Work Items dimension: 3
] Device 0, max Work Items dimension: 3
[HW] Device 0, max Work Items size for dimension: 0 8192
[HW] Device 0, max Work Items size for dimension: 1 8192
[HW] Device 0, max Work Items size for dimension: 2 8192

View File

@@ -56,6 +56,8 @@ bool nr_schedule_slsch(NR_UE_MAC_INST_t *mac, int frameP,int slotP, nr_sci_pdu_t
bool csi_acq = !mac->SL_MAC_PARAMS->sl_CSI_Acquisition;
bool csi_req_slot = !((slots_per_frame * frameP + slotP - sl_mac->slot_offset) % sl_mac->slot_periodicity);
if (rlc_status.bytes_in_buffer > 0 || mac->sci_pdu_rx.harq_feedback || (csi_acq && csi_req_slot)) {
LOG_I(NR_MAC, "%d.%d buffer %d\n",frameP, slotP, rlc_status.bytes_in_buffer );
// Fill SCI1A
sci_pdu->priority = 0;
sci_pdu->frequency_resource_assignment.val = 0;

View File

@@ -740,7 +740,7 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
sl_nr_rx_indication_t *rx_ind,
int pdu_id)
{
//LOG_I(NR_MAC,"nr_ue_process_mac_sl_pdu enter\n");
uint8_t *pduP = (rx_ind->rx_indication_body + pdu_id)->rx_slsch_pdu.pdu;
int32_t pdu_len = (int32_t)(rx_ind->rx_indication_body + pdu_id)->rx_slsch_pdu.pdu_length;
uint8_t done = 0;
@@ -750,6 +750,7 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
if (!pduP){
return;
}
//LOG_I(NR_MAC,"nr_ue_process_mac_sl_pdu pduP not null\n");
if (mac->sci_pdu_rx.harq_feedback) {
configure_psfch_params(module_idP, mac, rx_ind, pdu_id);
@@ -759,6 +760,8 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
LOG_D(NR_MAC, "%4d.%2d Configuring sl_csi_report parameters\n", frame, slot);
configure_csi_report_params(mac);
}
//LOG_I(NR_MAC,"nr_ue_process_mac_sl_pdu pduP not null %d.%d\n",frame,slot);
if ((rx_ind->rx_indication_body + pdu_id)->rx_slsch_pdu.ack_nack == 0)
return;
@@ -777,7 +780,7 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
case SL_SCH_LCID_4_19:
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len))
return;
LOG_D(NR_MAC, "%4d.%2d : SLSCH -> LCID %d %d bytes with subheader %d\n", frame, slot, rx_lcid, mac_len, mac_subheader_len);
LOG_I(NR_MAC, "%4d.%2d : SLSCH -> LCID %d %d bytes with subheader %d\n", frame, slot, rx_lcid, mac_len, mac_subheader_len);
mac_rlc_data_ind(module_idP,
mac->src_id,

View File

@@ -3345,7 +3345,7 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
buflen_remain);
if (sdu_length > 0) {
LOG_D(NR_MAC, "In %s: [UE %d] [%d.%d] SL-DXCH -> SLSCH, Generating SL MAC sub-PDU for SDU %d, length %d bytes, RB with LCID 0x%02x (buflen (TBS) %d bytes)\n",
LOG_I(NR_MAC, "In %s: [UE %d] [%d.%d] SL-DXCH -> SLSCH, Generating SL MAC sub-PDU for SDU %d, length %d bytes, RB with LCID 0x%02x (buflen (TBS) %d bytes)\n",
__FUNCTION__,
0,
frame,

View File

@@ -651,7 +651,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
rb_found:
{
LOG_D(PDCP, "%s() (drb %d) sending message to SDAP size %d\n", __func__, rb_id, size);
LOG_I(PDCP, "%s() (drb %d) sending message to SDAP size %d\n", __func__, rb_id, size);
sdap_data_ind(rb_id, ue->drb[rb_id - 1]->is_gnb, ue->drb[rb_id - 1]->has_sdap_rx, ue->drb[rb_id - 1]->pdusession_id, ue->rntiMaybeUEid, buf, size);
}
}
@@ -679,13 +679,13 @@ static void deliver_pdu_drb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id,
req->offset = GTPU_HEADER_OVERHEAD_MAX;
req->ue_id = ue_id;
req->bearer_id = rb_id;
LOG_D(PDCP, "%s() (drb %d) sending message to gtp size %d\n", __func__, rb_id, size);
LOG_I(PDCP, "%s() (drb %d) sending message to gtp size %d\n", __func__, rb_id, size);
extern instance_t CUuniqInstance;
itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
} else {
mem_block_t *memblock = get_free_mem_block(size, __FUNCTION__);
memcpy(memblock->data, buf, size);
LOG_D(PDCP, "%s(): (drb %d) calling rlc_data_req size %d\n", __func__, rb_id, size);
LOG_I(PDCP, "%s(): (drb %d) calling rlc_data_req size %d\n", __func__, rb_id, size);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
//printf("\n");
enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock);

View File

@@ -1498,7 +1498,7 @@ void sl_nr_process_rx_ind(uint16_t mod_id,
break;
case SL_NR_RX_PDU_TYPE_SLSCH:
LOG_D(NR_MAC, "%s[UE%d]SL-MAC Received SLSCH: rx_slsch_pdu:%p, rx_slsch_len %d, ack_nack %d, harq_pid %d\n",KGRN,
LOG_I(NR_MAC, "%s[UE%d]SL-MAC Received SLSCH: rx_slsch_pdu:%p, rx_slsch_len %d, ack_nack %d, harq_pid %d\n",KGRN,
mod_id,rx_ind->rx_indication_body[num_pdus - 1].rx_slsch_pdu.pdu,
rx_ind->rx_indication_body[num_pdus - 1].rx_slsch_pdu.pdu_length,
rx_ind->rx_indication_body[num_pdus - 1].rx_slsch_pdu.ack_nack,

View File

@@ -590,7 +590,7 @@ void nr_UE_configure_Sidelink(uint8_t id, uint8_t is_sync_source) {
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0, SL_CONFIG_STRING_UEINFO, 0);
config_get(SL_UEINFO,sizeof(SL_UEINFO)/sizeof(paramdef_t),aprefix);
LOG_I(NR_RRC,"SL L2 SRCid %x, SL ipv4 addr X.X.%d.%d\n",ueinfo.srcid,ueinfo.thirdOctet,ueinfo.fourthOctet);
nas_config(1 + ueinfo.srcid, ueinfo.thirdOctet, ueinfo.fourthOctet, "oai_sl_tun");
nas_config(1, ueinfo.thirdOctet, ueinfo.fourthOctet, "oai_sl_tun");
nr_rrc_mac_config_req_sl_preconfig(id, sl_preconfig, sync_source, ueinfo.srcid);

View File

@@ -3,22 +3,21 @@ SIDELINK_PRECONFIGURATION = (
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 1;
sl_nrofDownlinkSymbols = 10;
sl_nrofDownlinkSymbols = 6;
sl_nrofUplinkSlots = 8;
sl_nrofUplinkSymbols = 4;
sl_csi_rs = (
{
symb_l0 = 5;
# sl_csi_rs = (
# {
# symb_l0 = 4;
# csi_type 2 is not supported 38211, 8.4.1.5.3
csi_Type = 1;
sl_powerControlOffset = 1;
sl_powerControlOffsetSS = 1;
slot_Offset = 0;
slot_Periodicity = 4;
# Indicates if CSI Reporting is enabled in UNICAST. is 0-ENABLED, 1-DISABLED
sl_CSI_Acquisition = 0;
}
);
# csi_type = 1;
# power_control_offset = 1;
# power_control_offset_ss = 1;
# slot_offset = 0;
# slot_periodicity = 0;
# }
# );
sl_FrequencyCommonConfig = (
{
sl_offstToCarrier = 0;
@@ -36,12 +35,11 @@ SIDELINK_PRECONFIGURATION = (
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
# Num Symbols used for Sidelink in an uplink slot
# Herein, sl_LengthSymbols represents an index; not the number of symbols.
# This index value can be from 0 to 7 representing the (7 to 14 symbols)
sl_LengthSymbols = 7;
#Num Symbols used for Sidelink in an uplink slot
#Value can be between symbols 7 to 14
sl_LengthSymbols = 4;
#Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7
sl_StartSymbol = 0;
@@ -51,7 +49,7 @@ SIDELINK_PRECONFIGURATION = (
sl_syncCfg = (
{
#NUM SL-SSB within 16 frames
sl_NumSSB_WithinPeriod_0 = 4;
sl_NumSSB_WithinPeriod_0 = 2;
#Slot Offset for the first txn in the 16 frame period
sl_TimeOffsetSSB_0 = 8;
#interval in slots for repetition of SL-SSB
@@ -77,7 +75,7 @@ SIDELINK_PRECONFIGURATION = (
sl_NumSubchannel = 1;
# period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 3; //sl0
sl_PSFCH_Period = 0; //sl4
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1;
@@ -108,7 +106,7 @@ SIDELINK_PRECONFIGURATION = (
sl_NumSubchannel = 1;
# period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 3; //sl0
sl_PSFCH_Period = 0; //sl4
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1;
@@ -121,7 +119,7 @@ SIDELINK_PRECONFIGURATION = (
}
);
sl_UEINFO = (
sl_UEINFO = (
{
srcid = 0;
thirdOctet = 0;
@@ -130,3 +128,4 @@ SIDELINK_PRECONFIGURATION = (
);
}
);

View File

@@ -1,24 +1,24 @@
#Configure Sidelink Preconfiguration params here.
SIDELINK_PRECONFIGURATION = (
{
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 1;
sl_nrofDownlinkSymbols = 10;
sl_nrofDownlinkSymbols = 6;
sl_nrofUplinkSlots = 8;
sl_nrofUplinkSymbols = 4;
sl_csi_rs = (
{
symb_l0 = 5;
# sl_csi_rs = (
# {
# symb_l0 = 4;
# csi_type 2 is not supported 38211, 8.4.1.5.3
csi_Type = 1;
sl_powerControlOffset = 1;
sl_powerControlOffsetSS = 1;
slot_Offset = 0;
slot_Periodicity = 4;
# Indicates if CSI Reporting is enabled in UNICAST. is 0-ENABLED, 1-DISABLED
sl_CSI_Acquisition = 0;
}
);
# csi_type = 1;
# power_control_offset = 1;
# power_control_offset_ss = 1;
# slot_offset = 0;
# slot_periodicity = 0;
# sl_CSI_Acquisition = 1;
# }
# );
sl_FrequencyCommonConfig = (
{
sl_offstToCarrier = 0;
@@ -36,12 +36,11 @@ SIDELINK_PRECONFIGURATION = (
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
# Num Symbols used for Sidelink in an uplink slot
# Herein, sl_LengthSymbols represents an index; not the number of symbols.
# This index value can be from 0 to 7 representing the (7 to 14 symbols)
sl_LengthSymbols = 7;
#Num Symbols used for Sidelink in an uplink slot
#Value can be between symbols 7 to 14
sl_LengthSymbols = 4;
#Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7
sl_StartSymbol = 0;
@@ -51,7 +50,7 @@ SIDELINK_PRECONFIGURATION = (
sl_syncCfg = (
{
#NUM SL-SSB within 16 frames
sl_NumSSB_WithinPeriod_0 = 4;
sl_NumSSB_WithinPeriod_0 = 2;
#Slot Offset for the first txn in the 16 frame period
sl_TimeOffsetSSB_0 = 8;
#interval in slots for repetition of SL-SSB
@@ -75,18 +74,7 @@ SIDELINK_PRECONFIGURATION = (
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
# period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 3; //sl0
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1;
# Minimum time gap between PSFCH and the associated PSSCH in the unit of slots {sl2, sl3}
sl_MinTimeGapPSFCH = 1; //sl3
# Scrambling ID {0..1023} for sequence hopping of the PSFCH used in the resource pool
sl_PSFCH_HopID = 1;
# Number of PSFCH resources available {startSubCH, allocSubCH} for multiplexing HARQ-ACK information in a PSFCH transmission
sl_PSFCH_CandidateResourceType = 0; // startSubCH
sl_PSFCH_Period = 0;
}
);
@@ -106,22 +94,11 @@ SIDELINK_PRECONFIGURATION = (
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
# period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 3; //sl0
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1;
# Minimum time gap between PSFCH and the associated PSSCH in the unit of slots {sl2, sl3}
sl_MinTimeGapPSFCH = 1; //sl3
# Scrambling ID {0..1023} for sequence hopping of the PSFCH used in the resource pool
sl_PSFCH_HopID = 1;
# Number of PSFCH resources available {startSubCH, allocSubCH} for multiplexing HARQ-ACK information in a PSFCH transmission
sl_PSFCH_CandidateResourceType = 0; // startSubCH
sl_PSFCH_Period = 0;
}
);
sl_UEINFO = (
sl_UEINFO = (
{
srcid = 1;
thirdOctet = 0;
@@ -130,3 +107,5 @@ SIDELINK_PRECONFIGURATION = (
);
}
);

View File

@@ -0,0 +1,111 @@
#Configure Sidelink Preconfiguration params here.
SIDELINK_PRECONFIGURATION = (
{
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 1;
sl_nrofDownlinkSymbols = 6;
sl_nrofUplinkSlots = 8;
sl_nrofUplinkSymbols = 4;
# sl_csi_rs = (
# {
# symb_l0 = 4;
# csi_type 2 is not supported 38211, 8.4.1.5.3
# csi_type = 1;
# power_control_offset = 1;
# power_control_offset_ss = 1;
# slot_offset = 0;
# slot_periodicity = 0;
# sl_CSI_Acquisition = 1;
# }
# );
sl_FrequencyCommonConfig = (
{
sl_offstToCarrier = 0;
sl_subcarrierSpacing = 1;//0-15Khz, 1-30Khz
sl_carrierBandwidth = 106;//numPRBs
#NR bands for Sidelink n47, n38. N47 - 5855Mhz - 5925Mhz
#SL SSB chosen to be located from RB10 to RB21. points to the middle of the SSB block.
#SSB location should be within Sidelink BWP
# this is 2584.95 MHz => 301 REs from PointA 25 PRBs + 1 RE
sl_absoluteFrequencySSB = 516990;
# this is 2575.92 MHz (center frequency is 2585.1 MHz
sl_absoluteFrequencyPointA = 515184;
}
);
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
#Num Symbols used for Sidelink in an uplink slot
#Value can be between symbols 7 to 14
sl_LengthSymbols = 4;
#Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7
sl_StartSymbol = 0;
}
);
sl_syncCfg = (
{
#NUM SL-SSB within 16 frames
sl_NumSSB_WithinPeriod_0 = 2;
#Slot Offset for the first txn in the 16 frame period
sl_TimeOffsetSSB_0 = 8;
#interval in slots for repetition of SL-SSB
sl_TimeInterval_0 = 120;
}
);
sl_RxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 0;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 1; //12RBs
#Size of subchannel in RBs
#Possible values - {n10,n12,n15,n20,n25,n50,n75,n100}
sl_SubchannelSize = 5;//10RBs
#start in RB of the lowest subchannel in a rpool
sl_StartRB_Subchannel = 0;
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
sl_PSFCH_Period = 0;
}
);
sl_TxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 0;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 1; //12RBs
#Size of subchannel in RBs
#Possible values - {n10,n12,n15,n20,n25,n50,n75,n100}
sl_SubchannelSize = 5;//50RBs
#start in RB of the lowest subchannel in a rpool
sl_StartRB_Subchannel = 0;
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
sl_PSFCH_Period = 0;
}
);
sl_UEINFO = (
{
srcid = 2;
thirdOctet = 0;
fourthOctet = 3;
}
);
}
);