FreeCalypso > hg > tcs211-l1-reconst
changeset 148:ef14dccecd98
l1_sync.c: l1s_schedule_tasks() logic reconstructed,
but unable to match the compiler's register alloc
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 16 May 2016 03:10:42 +0000 |
parents | 80a10cce16e0 |
children | 9113e3ab9911 |
files | chipsetsw/layer1/cfile/l1_sync.c |
diffstat | 1 files changed, 25 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_sync.c Sun May 15 19:29:11 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_sync.c Mon May 16 03:10:42 2016 +0000 @@ -1284,7 +1284,7 @@ // ADC task is ENABLED in CS_MODE0. //-------------------------------- { - UWORD32 time_to_adc = 0 ; //omaps00090550 + UWORD32 time_to_adc; if (l1a_l1s_com.adc_mode & ADC_NEXT_CS_MODE0) { @@ -1453,7 +1453,7 @@ if(time_to_nbcchs >= modulus_times_51) time_to_nbcchs -= modulus_times_51; - if(time_to_nbcchs < (WORD32)min_time_to_nbcchs) + if(time_to_nbcchs < min_time_to_nbcchs) min_time_to_nbcchs = time_to_nbcchs; } @@ -1615,7 +1615,7 @@ MAX_FN - l1s.actual_time.fn; - if(time_to_smscb_info >= (WORD32)MAX_FN) time_to_smscb_info -= MAX_FN; + if(time_to_smscb_info >= MAX_FN) time_to_smscb_info -= MAX_FN; // Check if passing 1 schedule position. if(time_to_smscb_info == 0) @@ -1640,7 +1640,7 @@ MAX_FN - l1s.actual_time.fn; - if(time_to_norm_smscb >= (WORD32)MAX_FN) time_to_norm_smscb -= MAX_FN; + if(time_to_norm_smscb >= MAX_FN) time_to_norm_smscb -= MAX_FN; // Check if passing 1 schedule position. if(time_to_norm_smscb == 0) @@ -1664,7 +1664,7 @@ MAX_FN - l1s.actual_time.fn; - if(time_to_norm_smscb >= (WORD32)MAX_FN) time_to_norm_smscb -= MAX_FN; + if(time_to_norm_smscb >= MAX_FN) time_to_norm_smscb -= MAX_FN; // Check for "CBCH continuous reading" starting frame number. if(time_to_norm_smscb == 0) @@ -1704,7 +1704,7 @@ MAX_FN - l1s.actual_time.fn; - if(time_to_ext_smscb >= (WORD32)MAX_FN) time_to_ext_smscb -= MAX_FN; + if(time_to_ext_smscb >= MAX_FN) time_to_ext_smscb -= MAX_FN; // Check if passing 1 schedule position. if(time_to_ext_smscb == 0) @@ -1728,7 +1728,7 @@ MAX_FN - l1s.actual_time.fn; - if(time_to_ext_smscb >= (WORD32 )MAX_FN) time_to_ext_smscb -= MAX_FN; + if(time_to_ext_smscb >= MAX_FN) time_to_ext_smscb -= MAX_FN; // Check for "CBCH continuous reading" starting frame number. if(time_to_ext_smscb == 0) @@ -1759,7 +1759,7 @@ else min_time_to_smscb = time_to_ext_smscb; - if(time_to_smscb_info <(WORD32) min_time_to_smscb) + if(time_to_smscb_info < min_time_to_smscb) min_time_to_smscb = time_to_smscb_info; // Save scheduling result. @@ -1909,7 +1909,7 @@ // memorize the next BCCHN according to its priority // (TOP_PRIORITY or HIGH_PRIORITY or NORMAL_PRIORITY ) bcchn_priority = l1a_l1s_com.bcchn.list[i].gprs_priority ; - if(time_to_bcchn <(WORD32 ) min_time_to_bcchn[bcchn_priority]) + if(time_to_bcchn < min_time_to_bcchn[bcchn_priority]) { min_time_to_bcchn[bcchn_priority] = time_to_bcchn; @@ -1976,7 +1976,7 @@ // memorize the next BCCHN according to its priority // (TOP_PRIORITY or HIGH_PRIORITY or NORMAL_PRIORITY ) bcchn_priority = l1a_l1s_com.bcchn.list[i].gprs_priority; - if(time_to_bcchn < (WORD32)min_time_to_bcchn[bcchn_priority]) + if(time_to_bcchn < min_time_to_bcchn[bcchn_priority]) { min_time_to_bcchn[bcchn_priority] = time_to_bcchn; @@ -2222,13 +2222,10 @@ // then PEP scheduling has to be computed with "m_for_pep = m_index - 1" if(l1a_l1s_com.task_param[PEP] == SEMAPHORE_SET) { - UWORD16 u16Temp; // PAGING GROUP computation: - u16Temp = (l1pa_l1ps_com.pccch.pg_offset + (((m_for_pep) * l1pa_l1ps_com.pccch.pg_blks_avail) - / l1pa_l1ps_com.pccch.split_pg_value)) % l1pa_l1ps_com.pccch.pg_blks_avail; - - paging_group = u16Temp; + paging_group = (l1pa_l1ps_com.pccch.pg_offset + (((UWORD32)(m_for_pep) * (UWORD32)l1pa_l1ps_com.pccch.pg_blks_avail) + / (UWORD32)l1pa_l1ps_com.pccch.split_pg_value)) % l1pa_l1ps_com.pccch.pg_blks_avail; // Computation of the MF52 for MS Packet Extented Paging mf52_for_ms_epg = ((paging_group + 3) / l1pa_l1ps_com.pccch.nb_ppch_per_mf52) % 64; @@ -2365,7 +2362,7 @@ time_to_pbcchs += psi_period; // Save Min time to next PBCCHS block. - if(time_to_pbcchs < (WORD16)min_time_to_pbcchs) + if(time_to_pbcchs < min_time_to_pbcchs) { min_time_to_pbcchs = time_to_pbcchs; psi_index = i; @@ -3255,10 +3252,10 @@ #define MF26 2 UWORD8 channel = 255; - UWORD8 start_time =0; //omaps00090550 + UWORD8 start_time; UWORD8 fn_in_report_mod51 = l1s.next_time.fn_in_report % 51; - T_CHANNEL_DESCRIPTION *desc_ptr= NULL; - T_SDCCH_DESC *sdcch_desc = NULL;//OMAPS00090550 + T_CHANNEL_DESCRIPTION *desc_ptr; + T_SDCCH_DESC *sdcch_desc; if(l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) //--------------------------------------------- @@ -3554,7 +3551,7 @@ } // End of "if / current_status" } // End of "if / NSYNC" - if((l1a_l1s_com.l1s_en_task[DDL] == TASK_ENABLED) && (sdcch_desc != NULL)) + if (l1a_l1s_com.l1s_en_task[DDL] == TASK_ENABLED) //------------------------- // SDCCH DL task is ENABLED. //------------------------- @@ -3570,7 +3567,7 @@ l1s.task_status[DDL].time_to_exec = time_to_ddl; } - if((l1a_l1s_com.l1s_en_task[DUL] == TASK_ENABLED) && (sdcch_desc != NULL)) + if (l1a_l1s_com.l1s_en_task[DUL] == TASK_ENABLED) //------------------------- // SDCCH DUL task is ENABLED. //------------------------- @@ -3586,7 +3583,7 @@ l1s.task_status[DUL].time_to_exec = time_to_dul; } - if((l1a_l1s_com.l1s_en_task[ADL] == TASK_ENABLED) && (sdcch_desc != NULL)) + if (l1a_l1s_com.l1s_en_task[ADL] == TASK_ENABLED) //---------------------------------- // SACCH DL (SDCCH) task is ENABLED. //---------------------------------- @@ -3602,7 +3599,7 @@ l1s.task_status[ADL].time_to_exec = time_to_adl; } - if((l1a_l1s_com.l1s_en_task[AUL] == TASK_ENABLED) && (sdcch_desc != NULL)) + if (l1a_l1s_com.l1s_en_task[AUL] == TASK_ENABLED) //---------------------------------- // SACCH UL (SDCCH) task is ENABLED. //---------------------------------- @@ -3639,7 +3636,7 @@ // Neigbour Cell Synchro task enabled for DEDIC TCH or PACKET //----------------------------------------------------------- { - T_CHANNEL_DESCRIPTION *desc_ptr = NULL; //OMAPS00090550 + T_CHANNEL_DESCRIPTION *desc_ptr; if (l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) { @@ -3701,7 +3698,7 @@ { UWORD32 min_time_to_fb = MAX_FN; - if((l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) && (desc_ptr != NULL)) + if (l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) //--------------------------------------------- // Dedicated mode tasks are enabled. //--------------------------------------------- @@ -3758,7 +3755,7 @@ BOOL check_fbcnf26 = 0; UWORD32 min_time_to_fbconf = MAX_FN; - if((l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) && (desc_ptr != NULL)) + if (l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) //--------------------------------------------- // Dedicated mode tasks are enabled. //--------------------------------------------- @@ -3926,7 +3923,7 @@ BOOL check_sbcnf26 = 0; UWORD32 min_time_to_sbconf = MAX_FN; - if((l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) && (desc_ptr != NULL)) + if (l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) //--------------------------------------------- // Dedicated mode tasks are enabled. //--------------------------------------------- @@ -4634,7 +4631,7 @@ // ITMEAS task is ENABLED. //------------------------- { - UWORD8 time_to_itmeas =0 ; //omaps00090550 + UWORD8 time_to_itmeas; // time to ITMEAS processing // ITMEAS must be scheduled 2 frames in advance (C W W R scheme)