Commit a6f5ed78 authored by Raymond Knopp's avatar Raymond Knopp

more testing from another machine

parent 5cc40480
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
......@@ -727,10 +727,11 @@ void check_and_generate_pscch(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
((M_RB_PSCCH_RP>>1)*LPSCCH)-1);
// hard-coded to transmission mode one for now (Section 14.2.1.1 from 36.213 Rel14.3)
uint32_t a1=slsch->n_pscch/LPSCCH;
uint32_t a2=a1+slsch->n_pscch/LPSCCH+(M_RB_PSCCH_RP>>1);
uint32_t a2=a1+(M_RB_PSCCH_RP>>1);
uint32_t b1=slsch->n_pscch%LPSCCH;
uint32_t b2=(slsch->n_pscch + 1 + (a1%(LPSCCH-1)))%LPSCCH;
LOG_I(PHY,"Checking pscch for absSF %d (N_SL_RB_SC %d, LPSCCH %d, M_RB_PSCCH_RP %d, a1 %d, a2 %d, b1 %d, b2 %d) pscch_coded %d\n",
absSF, slsch->N_SL_RB_SC,LPSCCH, M_RB_PSCCH_RP,a1,a2,b1,b2,ue->pscch_coded);
......@@ -1116,14 +1117,14 @@ void rx_slcch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subframe_rx)
//AssertFatal(slsch->n_pscch < (M_RB_PSCCH_RP>>1)*LPSCCH,"n_pscch not in 0..%d\n",
// ((M_RB_PSCCH_RP>>1)*LPSCCH)-1);
for (int n_pscch = 0; n_pscch < (M_RB_PSCCH_RP>>1) ; n_pscch++) {
for (int n_pscch = 0; n_pscch < (M_RB_PSCCH_RP>>1)*LPSCCH ; n_pscch++) {
// hard-coded to transmission mode one for now (Section 14.2.1.1 from 36.213 Rel14.3)
uint32_t a1=n_pscch/LPSCCH;
uint32_t a2=a1+n_pscch/LPSCCH+(M_RB_PSCCH_RP>>1);
uint32_t a2=a1+(M_RB_PSCCH_RP>>1);
uint32_t b1=n_pscch%LPSCCH;
uint32_t b2=(n_pscch + 1 + (a1%(LPSCCH-1)))%LPSCCH;
if (frame_rx < 100) LOG_I(PHY,"%d.%d: Checking n_pscch %d => a1 %d, a2 %d, b1 %d, b2 %d (LPSCCH %d, M_RB_PSCCH_RP %d)\n",
if (frame_rx < 100) LOG_D(PHY,"%d.%d: Checking n_pscch %d => a1 %d, a2 %d, b1 %d, b2 %d (LPSCCH %d, M_RB_PSCCH_RP %d)\n",
frame_rx,subframe_rx,n_pscch,a1,a2,b1,b2,LPSCCH,M_RB_PSCCH_RP);
if (absSF_modP == b1) pscch_decoding(ue,proc,frame_rx,subframe_rx,a1,0);
else if (absSF_modP == b2) pscch_decoding(ue,proc,frame_rx,subframe_rx,a2,1);
......
......@@ -588,7 +588,7 @@ SLDCH_t *ue_get_sldch(module_id_t module_idP, int CC_id,frame_t frameP, sub_fram
@param subframe_tx TX subframe index
@returns pointer to SLSCH_t descriptor
*/
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe, int slsch_test);
/* \brief Function called by PHY to retrieve information to be transmitted using the RA procedure. If the UE is not in PUSCH mode for a particular eNB index, this is assumed to be an Msg3 and MAC attempts to retrieves the CCCH message from RRC. If the UE is in PUSCH mode for a particular eNB index and PUCCH format 0 (Scheduling Request) is not activated, the MAC may use this resource for random-access to transmit a BSR along with the C-RNTI control element (see 5.1.4 from 36.321)
@param Mod_id Index of UE instance
......
......@@ -3422,7 +3422,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
extern const int trp8[TRP8_MAX+1][8];
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP,int slsch_test) {
mac_rlc_status_resp_t rlc_status, rlc_status_data;
uint32_t absSF = (frameP*10)+subframeP;
......@@ -3473,7 +3473,10 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
ue->sl_info[i].LCID, 0xFFFF, ue->sourceL2Id, ue->sl_info[i].groupL2Id);
LOG_I(MAC,"Checking status (%d,Group %d) => LCID %d => %d bytes\n",ue->sourceL2Id,ue->sl_info[i].destinationL2Id);
if (rlc_status.bytes_in_buffer > 2){
if (rlc_status.bytes_in_buffer > 2 || slsch_test == 1){
if (slsch_test == 1 && rlc_status.bytes_in_buffer <= 2) rlc_status.bytes_in_buffer = 300;
LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer);
// Fill in group id for off-network communications
ue->sltx_active = 1;
......
......@@ -139,6 +139,7 @@
{"sim-L1", CONFIG_HLP_SIML1, 0, iptr:&simL1, defintval:0, TYPE_INT, 0}, \
{"ue-enable-sl", CONFIG_HLP_ENABLESL, PARAMFLAG_BOOL, iptr:&sidelink_active, defintval:0, TYPE_INT, 0}, \
{"ue-sl-only", CONFIG_HLP_SLONLY, PARAMFLAG_BOOL, iptr:&SLonly, defintval:0, TYPE_INT, 0}, \
{"ue-slsch-test", CONFIG_HLP_SLSCHTEST, PARAMBLAG_BOOL, iptr:&SLSCHtest, defintval:0, TYPE_INT, 0}, \
{"ue-synchref", CONFIG_HLP_SYNCHREF, PARAMFLAG_BOOL, iptr:&synchRef, defintval:0, TYPE_INT, 0}, \
{"ue-slsync-only", CONFIG_HLP_SLSYNCONLY, PARAMFLAG_BOOL, iptr:&slsynconly, defintval:0, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
......@@ -267,7 +268,7 @@ extern void set_function_spec_param(RU_t *ru);
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
extern void fill_ue_band_info(void);
extern void init_UE(int,int,int,int,int,int,int,int);
extern void init_UE(int,int,int,int,int,int,int,int,int);
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char * name);
extern void reset_opp_meas(void);
......
......@@ -80,7 +80,7 @@ void *UE_thread(void *arg);
void *UE_threadSL(void *arg);
void init_UE_stub(int nb_inst,int,int,char*,int);
void ue_stub_rx_handler(unsigned int, char *);
void init_UE(int,int,int,int,int,int,int,int);
void init_UE(int,int,int,int,int,int,int,int,int);
int32_t **rxdata;
int32_t **txdata;
......@@ -223,7 +223,7 @@ void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_
}
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction,int sidelink_active,int SLonly,int isSynchRef,int slsynconly) {
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction,int sidelink_active,int SLonly,int isSynchRef,int slsynconly,int SLSCHtest) {
PHY_VARS_UE *UE;
int inst;
......@@ -245,8 +245,9 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
PHY_vars_UE_g[inst][0]->SLonly = SLonly;
PHY_vars_UE_g[inst][0]->is_SynchRef = isSynchRef;
PHY_vars_UE_g[inst][0]->SLsynconly;
PHY_vars_UE_g[inst][0]->SLsynconly = slsynconly;
PHY_vars_UE_g[inst][0]->SLSCHtest = SLSCHtest;
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
init_UE_threads(inst);
UE = PHY_vars_UE_g[inst][0];
......
......@@ -161,6 +161,7 @@ int sidelink_active=0;
int SLonly=0;
int synchRef=0;
int slsynconly=0;
int SLSCHtest=0;
#if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
......@@ -1051,7 +1052,7 @@ int main( int argc, char **argv )
// start the main threads
int eMBMS_active = 0;
init_UE(1,eMBMS_active,uecap_xer_in,0,sidelink_active,SLonly,synchRef,slsynconly);
init_UE(1,eMBMS_active,uecap_xer_in,0,sidelink_active,SLonly,synchRef,slsynconly,SLSCHtest);
if (phy_test==0) {
printf("Filling UE band info\n");
......
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