Fix nr_srssim linking problems when building with E2 support
In this case, there are a number of linker errors:
/usr/bin/ld: libL2_NR.a(rrc_gNB.c.o): in function `nr_rrc_transfer_protected_rrc_message':
/home/richie/oai/openair2/RRC/NR/rrc_gNB.c:330:(.text+0x6f6): undefined reference to `signal_rrc_msg'
However, nr_srssim does not need RRC, while it is being linked in. Thus,
link without nr_rrc and L2. For the remaining two linker problems:
- provide a definition of NR_IF_Module_init() as in most other
simulators
- move rrc_get_max_nr_csrs() to nr_common.c. It is already declared in
the corresponding header, and itself does not have anything to do with
RRC radio configuration, therefore it does not belong to
nr_radio_config.c
This commit is contained in:
+1
-1
@@ -2080,7 +2080,7 @@ add_executable(nr_srssim
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(nr_srssim PRIVATE
|
target_link_libraries(nr_srssim PRIVATE
|
||||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc L2_NR -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON -lz -Wl,--end-group
|
||||||
m pthread ITTI dl nr_ue_phy_meas physim_common
|
m pthread ITTI dl nr_ue_phy_meas physim_common
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1447,6 +1447,31 @@ unsigned short get_N_b_srs(int c_srs, int b_srs) {
|
|||||||
return srs_bandwidth_config[c_srs][b_srs][1];
|
return srs_bandwidth_config[c_srs][b_srs][1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Implement to b_SRS = 1 and b_SRS = 2
|
||||||
|
long rrc_get_max_nr_csrs(const int max_rbs, const long b_SRS)
|
||||||
|
{
|
||||||
|
if(b_SRS>0) {
|
||||||
|
LOG_E(NR_RRC,"rrc_get_max_nr_csrs(): Not implemented yet for b_SRS>0\n");
|
||||||
|
return 0; // This c_srs is always valid
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint16_t m_SRS[64] = { 4, 8, 12, 16, 16, 20, 24, 24, 28, 32, 36, 40, 48, 48, 52, 56, 60, 64, 72, 72, 76, 80, 88,
|
||||||
|
96, 96, 104, 112, 120, 120, 120, 128, 128, 128, 132, 136, 144, 144, 144, 144, 152, 160,
|
||||||
|
160, 160, 168, 176, 184, 192, 192, 192, 192, 208, 216, 224, 240, 240, 240, 240, 256, 256,
|
||||||
|
256, 264, 272, 272, 272 };
|
||||||
|
|
||||||
|
long c_srs = 0;
|
||||||
|
uint16_t m = 4;
|
||||||
|
for(int c = 1; c<64; c++) {
|
||||||
|
if(m_SRS[c]>m && m_SRS[c]<max_rbs) {
|
||||||
|
c_srs = c;
|
||||||
|
m = m_SRS[c];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return c_srs;
|
||||||
|
}
|
||||||
|
|
||||||
frequency_range_t get_freq_range_from_freq(uint64_t freq)
|
frequency_range_t get_freq_range_from_freq(uint64_t freq)
|
||||||
{
|
{
|
||||||
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
|
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ nrUE_params_t *get_nrUE_params(void)
|
|||||||
channel_desc_t *UE2gNB[MAX_MOBILES_PER_GNB][NUMBER_OF_gNB_MAX];
|
channel_desc_t *UE2gNB[MAX_MOBILES_PER_GNB][NUMBER_OF_gNB_MAX];
|
||||||
configmodule_interface_t *uniqCfg = NULL;
|
configmodule_interface_t *uniqCfg = NULL;
|
||||||
|
|
||||||
|
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
|
||||||
|
|
||||||
void e1_bearer_context_setup(const e1ap_bearer_setup_req_t *req)
|
void e1_bearer_context_setup(const e1ap_bearer_setup_req_t *req)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
|
|||||||
@@ -652,31 +652,6 @@ static void set_dl_maxmimolayers(NR_PDSCH_ServingCellConfig_t *pdsch_servingcell
|
|||||||
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(maxMIMO_layers, ue_supported_layers);
|
*pdsch_servingcellconfig->ext1->maxMIMO_Layers = min(maxMIMO_layers, ue_supported_layers);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Implement to b_SRS = 1 and b_SRS = 2
|
|
||||||
long rrc_get_max_nr_csrs(const int max_rbs, const long b_SRS) {
|
|
||||||
|
|
||||||
if(b_SRS>0) {
|
|
||||||
LOG_E(NR_RRC,"rrc_get_max_nr_csrs(): Not implemented yet for b_SRS>0\n");
|
|
||||||
return 0; // This c_srs is always valid
|
|
||||||
}
|
|
||||||
|
|
||||||
const uint16_t m_SRS[64] = { 4, 8, 12, 16, 16, 20, 24, 24, 28, 32, 36, 40, 48, 48, 52, 56, 60, 64, 72, 72, 76, 80, 88,
|
|
||||||
96, 96, 104, 112, 120, 120, 120, 128, 128, 128, 132, 136, 144, 144, 144, 144, 152, 160,
|
|
||||||
160, 160, 168, 176, 184, 192, 192, 192, 192, 208, 216, 224, 240, 240, 240, 240, 256, 256,
|
|
||||||
256, 264, 272, 272, 272 };
|
|
||||||
|
|
||||||
long c_srs = 0;
|
|
||||||
uint16_t m = 4;
|
|
||||||
for(int c = 1; c<64; c++) {
|
|
||||||
if(m_SRS[c]>m && m_SRS[c]<max_rbs) {
|
|
||||||
c_srs = c;
|
|
||||||
m = m_SRS[c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return c_srs;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(const NR_ServingCellConfigCommon_t *scc,
|
static struct NR_SRS_Resource__resourceType__periodic *configure_periodic_srs(const NR_ServingCellConfigCommon_t *scc,
|
||||||
const int uid)
|
const int uid)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user