Commit f32c759e authored by Raymond Knopp's avatar Raymond Knopp

modifications to allow running SL without --phy-test flag

parent 88b6cdd2
......@@ -1124,8 +1124,8 @@ target_link_libraries(PHY_COMMON PRIVATE asn1_lte_rrc_hdrs)
add_library(PHY ${PHY_SRC})
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
pkg_check_modules(blas REQUIRED blas)
pkg_check_modules(lapacke REQUIRED lapacke)
#pkg_check_modules(blas REQUIRED blas)
#pkg_check_modules(lapacke REQUIRED lapacke)
add_library(PHY_UE ${PHY_SRC_UE})
target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
......
......@@ -622,7 +622,6 @@ void processSlotTX(void *arg) {
nr_phy_data_tx_t phy_data = {0};
int sl_tx_action = 0;
LOG_D(PHY,"%d.%d => slot type %d\n", proc->frame_tx, proc->nr_slot_tx, proc->tx_slot_type);
if (proc->tx_slot_type == NR_SIDELINK_SLOT && UE->sl_mode == 2) {
......@@ -1008,10 +1007,11 @@ void *UE_thread(void *arg)
curMsg.proc.nr_slot_tx = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
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;
if (mac->phy_config_request_sent) {
if (UE->phy_config_request_sent) {
if (is_sidelink) {
curMsg.proc.rx_slot_type = sl_nr_ue_slot_select(sl_cfg, curMsg.proc.frame_rx, curMsg.proc.nr_slot_rx, TDD);
curMsg.proc.tx_slot_type = sl_nr_ue_slot_select(sl_cfg, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx, TDD);
LOG_D(NR_PHY,"Setting SL slot type to TX %d.%d %d, RX %d.%d %d\n",curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx,curMsg.proc.tx_slot_type,curMsg.proc.frame_rx, curMsg.proc.nr_slot_rx,curMsg.proc.rx_slot_type);
} else {
curMsg.proc.rx_slot_type = nr_ue_slot_select(cfg, curMsg.proc.frame_rx, curMsg.proc.nr_slot_rx);
curMsg.proc.tx_slot_type = nr_ue_slot_select(cfg, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx);
......
......@@ -523,7 +523,7 @@ int main( int argc, char **argv ) {
get_softmodem_params()->numerology,
nr_band);
}
else{
else if (get_softmodem_params()->sl_mode != 2){
DevAssert(mac->if_module != NULL && mac->if_module->phy_config_request != NULL);
mac->if_module->phy_config_request(&mac->phy_config);
mac->phy_config_request_sent = true;
......@@ -547,7 +547,6 @@ int main( int argc, char **argv ) {
get_nrUE_params()->ofdm_offset_divisor);
sl_ue_phy_init(UE[CC_id]);
}
}
bool is_sl = (get_softmodem_params()->sl_mode) ? 1 : 0;
......
......@@ -47,7 +47,7 @@
#include <execinfo.h>
#include <getopt.h>
#include <sys/sysinfo.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -49,6 +49,7 @@
#include "common_lib.h"
#include "fapi_nr_ue_interface.h"
#include "assertions.h"
#include <stdbool.h>
#ifdef MEX
#define msg mexPrintf
......@@ -654,6 +655,7 @@ typedef struct {
//Sidelink parameters
sl_nr_sidelink_mode_t sl_mode;
sl_nr_ue_phy_params_t SL_UE_PHY_PARAMS;
bool phy_config_request_sent;
} PHY_VARS_NR_UE;
typedef struct {
......
......@@ -671,7 +671,9 @@ int8_t nr_ue_sl_phy_config_request(nr_sl_phy_config_t *phy_config)
sl_nr_phy_config_request_t *sl_config = &PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->SL_UE_PHY_PARAMS.sl_config;
if(phy_config != NULL) {
memcpy(sl_config,&phy_config->sl_config_req,sizeof(sl_nr_phy_config_request_t));
PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->phy_config_request_sent = true;
}
return 0;
}
/*
......@@ -746,4 +748,4 @@ int8_t sl_handle_scheduled_response(nr_scheduled_response_t *scheduled_response)
}
return 0;
}
\ No newline at end of file
}
......@@ -323,4 +323,4 @@ int phy_procedures_nrUE_SL_TX(PHY_VARS_NR_UE *ue,
stop_meas(&sl_phy_params->phy_proc_sl_tx);
return tx_action;
}
\ No newline at end of file
}
......@@ -611,4 +611,4 @@ void nr_rrc_mac_config_req_sl_mib(module_id_t module_id,
mac->if_module->sl_phy_config_request(&sl_mac->sl_phy_config);
}
}
\ No newline at end of file
}
......@@ -58,7 +58,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) {
int scs = get_softmodem_params()->sa ?
get_softmodem_params()->numerology :
rrc_inst ?
rrc_inst && rrc_inst->scell_group_config ?
*rrc_inst->scell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon->ssbSubcarrierSpacing :
- 1;
if (scs > -1)
......
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