Commit 0339b49b authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

RRC .ans1 file and test asn1c

parent b61e8007
......@@ -327,6 +327,57 @@ add_custom_command (
DEPENDS ${RRC_GRAMMAR}
)
#NR RRC
add_list2_option(NR_RRC_ASN1_VERSION "Rel15" "ASN.1 version of NR_RRC interface")
if (${NR_RRC_ASN1_VERSION} STREQUAL "Rel15")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/ans1c/ASN1_files/NR-RRC-Definitions.asn)
endif (${NR_RRC_ASN1_VERSION} STREQUAL "Rel15")
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
if(NOT EXISTS ${asn1c_call})
message( FATAL_ERROR "The script ${asn1c_call} must be present" )
endif(NOT EXISTS ${asn1c_call})
execute_process(COMMAND ${asn1c_call}
${NR_RRC_FULL_DIR}
${RRC_GRAMMAR}
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0)
if(NOT EXISTS ${fix_asn1c_call})
message( FATAL_ERROR "The script ${fix_asn1c_call} must be present" )
endif(NOT EXISTS ${fix_asn1c_call})
execute_process(COMMAND ${fix_asn1c_call} ${NR_RRC_FULL_DIR} NR_RRC ${NR_RRC_ASN1_VERSION}
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0)
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/asn1_constants.h)
set_source_files_properties(${nr_rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source}
${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c)
include_directories ("${NR_RRC_FULL_DIR}")
# add the command to generate the source code
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
add_custom_command (
OUTPUT ${NR_RRC_FULL_DIR}/asn1_constants.h
COMMAND ${asn1c_call} ${NR_RRC_FULL_DIR} ${RRC_GRAMMAR}
COMMAND ${fix_asn1c_call} ${NR_RRC_FULL_DIR} RRC ${NR_RRC_ASN1_VERSION}
DEPENDS ${RRC_GRAMMAR}
)
# S1AP
# Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time
......
......@@ -48,6 +48,7 @@ DEADLINE_SCHEDULER_FLAG_USER="False"
FORCE_DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL="Rel14"
NR_REL="Rel15"
HW="None"
TP="None"
NOS1=0
......@@ -574,6 +575,7 @@ function main() {
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( NR_RRC_ASN1_VERSION \"${NR_REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
......
......@@ -109,6 +109,22 @@ function patch_rrc()
esac
}
function patch_nr_rrc()
{
local directory="$1"
local version="$2"
case "$version" in
Rel15 )
echo "patching NR_RRC files release 15"
apply_patches "$directory" NR_RRC_Rel15 ${#NR_RRC_Rel15[*]}
;;
* )
error unknwon/unhandled NR_RRC version \'"$version"\'
;;
esac
}
function patch_x2ap()
{
local directory="$1"
......@@ -161,6 +177,9 @@ function main()
RRC )
patch_rrc "$directory" "$version"
;;
NR_RRC )
patch_nr_rrc "$directory" "$version"
;;
X2AP )
patch_x2ap "$directory" "$version"
;;
......
......@@ -240,6 +240,93 @@ typedef struct NbIoTRrcConfigurationReq_s {
long ue_TimersAndConstants_n311_NB;
} NbIoTRrcConfigurationReq;
// eNB: ENB_APP -> RRC messages
typedef struct RrcConfigurationReq_s {
uint32_t cell_identity;
uint16_t tac;
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
/*
paging_drx_t default_drx;
int16_t nb_cc;
lte_frame_type_t frame_type[MAX_NUM_CCs];
uint8_t tdd_config[MAX_NUM_CCs];
uint8_t tdd_config_s[MAX_NUM_CCs];
lte_prefix_type_t prefix_type[MAX_NUM_CCs];
uint8_t pbch_repetition[MAX_NUM_CCs];
int16_t eutra_band[MAX_NUM_CCs];
uint32_t downlink_frequency[MAX_NUM_CCs];
int32_t uplink_frequency_offset[MAX_NUM_CCs];
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
int nb_antenna_ports[MAX_NUM_CCs];
long prach_root[MAX_NUM_CCs];
long prach_config_index[MAX_NUM_CCs];
BOOLEAN_t prach_high_speed[MAX_NUM_CCs];
long prach_zero_correlation[MAX_NUM_CCs];
long prach_freq_offset[MAX_NUM_CCs];
long pucch_delta_shift[MAX_NUM_CCs];
long pucch_nRB_CQI[MAX_NUM_CCs];
long pucch_nCS_AN[MAX_NUM_CCs];
#if !defined(Rel10) && !defined(Rel14)
long pucch_n1_AN[MAX_NUM_CCs];
#endif
long pdsch_referenceSignalPower[MAX_NUM_CCs];
long pdsch_p_b[MAX_NUM_CCs];
long pusch_n_SB[MAX_NUM_CCs];
long pusch_hoppingMode[MAX_NUM_CCs];
long pusch_hoppingOffset[MAX_NUM_CCs];
BOOLEAN_t pusch_enable64QAM[MAX_NUM_CCs];
BOOLEAN_t pusch_groupHoppingEnabled[MAX_NUM_CCs];
long pusch_groupAssignment[MAX_NUM_CCs];
BOOLEAN_t pusch_sequenceHoppingEnabled[MAX_NUM_CCs];
long pusch_nDMRS1[MAX_NUM_CCs];
long phich_duration[MAX_NUM_CCs];
long phich_resource[MAX_NUM_CCs];
BOOLEAN_t srs_enable[MAX_NUM_CCs];
long srs_BandwidthConfig[MAX_NUM_CCs];
long srs_SubframeConfig[MAX_NUM_CCs];
BOOLEAN_t srs_ackNackST[MAX_NUM_CCs];
BOOLEAN_t srs_MaxUpPts[MAX_NUM_CCs];
long pusch_p0_Nominal[MAX_NUM_CCs];
long pusch_alpha[MAX_NUM_CCs];
long pucch_p0_Nominal[MAX_NUM_CCs];
long msg3_delta_Preamble[MAX_NUM_CCs];
long ul_CyclicPrefixLength[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
long rach_messageSizeGroupA[MAX_NUM_CCs];
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
long rach_powerRampingStep[MAX_NUM_CCs];
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
long rach_preambleTransMax[MAX_NUM_CCs];
long rach_raResponseWindowSize[MAX_NUM_CCs];
long rach_macContentionResolutionTimer[MAX_NUM_CCs];
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];
long bcch_modificationPeriodCoeff[MAX_NUM_CCs];
long pcch_defaultPagingCycle[MAX_NUM_CCs];
long pcch_nB[MAX_NUM_CCs];
long ue_TimersAndConstants_t300[MAX_NUM_CCs];
long ue_TimersAndConstants_t301[MAX_NUM_CCs];
long ue_TimersAndConstants_t310[MAX_NUM_CCs];
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
*/
} gNB_RrcConfigurationReq;
// UE: NAS -> RRC messages
typedef kenb_refresh_req_t NasKenbRefreshReq;
......
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