comparison chipsetsw/layer1/cfile/l1_cmplx.c @ 61:e4e3d406d4f3

l1_cmplx.c: l1s_ctrl_tch{th,tf,a} reconstructed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 27 Mar 2016 18:20:37 +0000
parents 0894f542a30c
children 98b25a73c57a
comparison
equal deleted inserted replaced
60:0894f542a30c 61:e4e3d406d4f3
4248 #endif 4248 #endif
4249 4249
4250 /*--------------------------------------------*/ 4250 /*--------------------------------------------*/
4251 /* Program TPU... */ 4251 /* Program TPU... */
4252 /*--------------------------------------------*/ 4252 /*--------------------------------------------*/
4253 lna_off = IL_info_ptr->lna_off;
4254 // for TCHTH we use DPAGC algorithm. 4253 // for TCHTH we use DPAGC algorithm.
4255 #if DPAGC_MAX_FLAG 4254 #if DPAGC_MAX_FLAG
4256 agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, MAX_ID); 4255 agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, MAX_ID);
4257 #else 4256 #else
4258 agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID); 4257 agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID);
4259 #endif 4258 #endif
4259 lna_off = IL_info_ptr->lna_off;
4260 4260
4261 4261
4262 // Store input_level and lna_off fields used for current CTRL in order to be able 4262 // Store input_level and lna_off fields used for current CTRL in order to be able
4263 // to build IL from pm in READ phase. 4263 // to build IL from pm in READ phase.
4264 l1a_l1s_com.Scell_used_IL = *IL_info_ptr; 4264 l1a_l1s_com.Scell_used_IL = *IL_info_ptr;
4834 4834
4835 /*--------------------------------------------*/ 4835 /*--------------------------------------------*/
4836 /* Program TPU... */ 4836 /* Program TPU... */
4837 /*--------------------------------------------*/ 4837 /*--------------------------------------------*/
4838 4838
4839 lna_off = IL_info_ptr->lna_off;
4840 // for TCHTF we use DPAGC algorithm. 4839 // for TCHTF we use DPAGC algorithm.
4841 #if DPAGC_MAX_FLAG 4840 #if DPAGC_MAX_FLAG
4842 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID); 4841 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID);
4843 #else 4842 #else
4844 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID); 4843 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID);
4845 #endif 4844 #endif
4845 lna_off = IL_info_ptr->lna_off;
4846 4846
4847 4847
4848 // Store input_level and lna_off fields used for current CTRL in order to be able 4848 // Store input_level and lna_off fields used for current CTRL in order to be able
4849 // to build IL from pm in READ phase. 4849 // to build IL from pm in READ phase.
4850 l1a_l1s_com.Scell_used_IL = *IL_info_ptr; 4850 l1a_l1s_com.Scell_used_IL = *IL_info_ptr;
4966 // Rem: when mode is "SIGNALLING ONLY" the "dll_read_dcch()" function 4966 // Rem: when mode is "SIGNALLING ONLY" the "dll_read_dcch()" function
4967 // always gives back a block of FACCH (true block or dummy one). 4967 // always gives back a block of FACCH (true block or dummy one).
4968 // In ETM test mode, the protocol stack is not active and hence we do not require any FACCH data from L23 4968 // In ETM test mode, the protocol stack is not active and hence we do not require any FACCH data from L23
4969 // But this change is applicable only when ETM scripts are run with PS-builds. In case of L1-SA, 4969 // But this change is applicable only when ETM scripts are run with PS-builds. In case of L1-SA,
4970 // dll_read_dcch() is called which is just a stub function (It just returns a NULL ptr for L1 SA) 4970 // dll_read_dcch() is called which is just a stub function (It just returns a NULL ptr for L1 SA)
4971 /* FreeCalypso: this logic is not present in TCS211 */
4972 #if 0
4971 #if TESTMODE 4973 #if TESTMODE
4972 #if (OP_L1_STANDALONE == 0) 4974 #if (OP_L1_STANDALONE == 0)
4973 if(!l1_config.TestMode) 4975 if(!l1_config.TestMode)
4974 #endif // (OP_L1_STANDALONE == 0) 4976 #endif // (OP_L1_STANDALONE == 0)
4975 #endif // TESTMODE 4977 #endif // TESTMODE
4978 #endif
4976 { 4979 {
4977 tx_data = dll_read_dcch(channel_mode); 4980 tx_data = dll_read_dcch(channel_mode);
4978 } 4981 }
4979 4982
4980 if(tx_data != NULL) 4983 if(tx_data != NULL)
5557 #endif 5560 #endif
5558 5561
5559 /*--------------------------------------------*/ 5562 /*--------------------------------------------*/
5560 /* Program TPU... */ 5563 /* Program TPU... */
5561 /*--------------------------------------------*/ 5564 /*--------------------------------------------*/
5562 lna_off = IL_info_ptr->lna_off;
5563 // for TCHA we use DPAGC algorithm. 5565 // for TCHA we use DPAGC algorithm.
5564 #if DPAGC_MAX_FLAG 5566 #if DPAGC_MAX_FLAG
5565 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID); 5567 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID);
5566 #else 5568 #else
5567 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID); 5569 agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID);
5568 #endif 5570 #endif
5571 lna_off = IL_info_ptr->lna_off;
5569 5572
5570 5573
5571 5574
5572 // Store input_level and lna_off fields used for current CTRL in order to be able 5575 // Store input_level and lna_off fields used for current CTRL in order to be able
5573 // to build IL from pm in READ phase. 5576 // to build IL from pm in READ phase.
5640 // Handover command is received from L3 through L1A. 5643 // Handover command is received from L3 through L1A.
5641 // When Handover access is in progress, nothing but RACH can be transmitted. 5644 // When Handover access is in progress, nothing but RACH can be transmitted.
5642 // RACH is not allowed on SACCH therefore TX is avoided by setting 5645 // RACH is not allowed on SACCH therefore TX is avoided by setting
5643 // the txpwr to NO_TXPWR !!! 5646 // the txpwr to NO_TXPWR !!!
5644 { 5647 {
5648 #if 0 /* LoCosto code */
5645 // NOTE: The spec says RACH bursts on SACCH UL is optional. hence it should not be counted 5649 // NOTE: The spec says RACH bursts on SACCH UL is optional. hence it should not be counted
5646 // Refer spec 04.08 5650 // Refer spec 04.08
5647 l1s_ctrl_rach(RAHO,NO_PAR); 5651 l1s_ctrl_rach(RAHO,NO_PAR);
5652 #else /* TCS211 reconstruction, code taken from TSM30 */
5653 // Set TXPWR.
5654 l1ddsp_load_txpwr(NO_TXPWR, radio_freq);
5655
5656 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
5657 RTTL1_FILL_UL_NB(task, l1a_l1s_com.dedic_set.aset->timing_advance, NO_TXPWR)
5658 #endif
5659 #endif
5648 } 5660 }
5649 else 5661 else
5650 // TCH/UL is a normal burst. 5662 // TCH/UL is a normal burst.
5651 // TX power must be the normal one 5663 // TX power must be the normal one
5652 { 5664 {
5673 { 5685 {
5674 adc_active_ul = ACTIVE; 5686 adc_active_ul = ACTIVE;
5675 l1a_l1s_com.adc_cpt = 0; 5687 l1a_l1s_com.adc_cpt = 0;
5676 } 5688 }
5677 5689
5690 #if 1 /* FreeCalypso TCS211 reconstruction */
5691 } // End of "TCH/UL is a normal burst"
5692 #endif
5678 5693
5679 // In any case (normal TX or no TX due to Handover Access process) 5694 // In any case (normal TX or no TX due to Handover Access process)
5680 // the full TCHA task must be controled for TPU and DSP. 5695 // the full TCHA task must be controled for TPU and DSP.
5681 { 5696 {
5682 T_RADIO_FRAME *tx_data = NULL; 5697 T_RADIO_FRAME *tx_data = NULL;
5827 { 5842 {
5828 l1dtpu_serv_tx_nb(radio_freq, l1a_l1s_com.dedic_set.aset->timing_advance, l1s.tpu_offset, l1s.applied_txpwr, adc_active_ul); 5843 l1dtpu_serv_tx_nb(radio_freq, l1a_l1s_com.dedic_set.aset->timing_advance, l1s.tpu_offset, l1s.applied_txpwr, adc_active_ul);
5829 } 5844 }
5830 } 5845 }
5831 5846
5847 #if 0 /* FreeCalypso TCS211 reconstruction */
5832 } // End of "TCH/UL is a normal burst" 5848 } // End of "TCH/UL is a normal burst"
5849 #endif
5833 5850
5834 /*----------------------------------------------*/ 5851 /*----------------------------------------------*/
5835 /* Common for Dedicated mode: DSP parameters... */ 5852 /* Common for Dedicated mode: DSP parameters... */
5836 /*----------------------------------------------*/ 5853 /*----------------------------------------------*/
5837 5854
5902 l1a_l1s_com.dedic_set.sync_tch = FALSE; 5919 l1a_l1s_com.dedic_set.sync_tch = FALSE;
5903 #if (FF_L1_TCH_VOCODER_CONTROL) 5920 #if (FF_L1_TCH_VOCODER_CONTROL)
5904 l1a_l1s_com.dedic_set.reset_sacch = FALSE; 5921 l1a_l1s_com.dedic_set.reset_sacch = FALSE;
5905 #endif 5922 #endif
5906 5923
5924 #if 0 /* FreeCalypso TCS211 reconstruction */
5907 if(l1a_l1s_com.dedic_set.aset->ho_acc_to_send == 0) 5925 if(l1a_l1s_com.dedic_set.aset->ho_acc_to_send == 0)
5908 { 5926 {
5927 #endif
5909 // Set tpu window identifier for Power meas or FS/SB search. 5928 // Set tpu window identifier for Power meas or FS/SB search.
5910 l1s.tpu_win = (3 * BP_SPLIT) + l1_config.params.tx_nb_load_split + l1_config.params.rx_synth_load_split; 5929 l1s.tpu_win = (3 * BP_SPLIT) + l1_config.params.tx_nb_load_split + l1_config.params.rx_synth_load_split;
5911 5930
5912 /*--------------------------------------------*/ 5931 /*--------------------------------------------*/
5913 /* Flag DSP and TPU programmation... */ 5932 /* Flag DSP and TPU programmation... */
5934 #if TESTMODE 5953 #if TESTMODE
5935 // Continuous mode: if end of control of START_RX/TX: go to CONTINUOUS state 5954 // Continuous mode: if end of control of START_RX/TX: go to CONTINUOUS state
5936 if (l1_config.TestMode && (l1_config.tmode.rf_params.tmode_continuous != TM_NO_CONTINUOUS)) 5955 if (l1_config.TestMode && (l1_config.tmode.rf_params.tmode_continuous != TM_NO_CONTINUOUS))
5937 l1_config.tmode.rf_params.tmode_continuous = TM_CONTINUOUS; 5956 l1_config.tmode.rf_params.tmode_continuous = TM_CONTINUOUS;
5938 #endif 5957 #endif
5958
5959 #if 0 /* FreeCalypso TCS211 reconstruction */
5939 } 5960 }
5940 5961 #endif
5941 } 5962 }
5942 5963
5943 #if (MOVE_IN_INTERNAL_RAM == 0) // Must be followed by the pragma used to duplicate the funtion in internal RAM 5964 #if (MOVE_IN_INTERNAL_RAM == 0) // Must be followed by the pragma used to duplicate the funtion in internal RAM
5944 //#pragma DUPLICATE_FOR_INTERNAL_RAM_START 5965 //#pragma DUPLICATE_FOR_INTERNAL_RAM_START
5945 5966