blob: a21f9d2b9dee606ffa933d8d597865448990ad6d [file] [log] [blame]
/*******************************************************************************
* Modification Notice:
* --------------------------
* This software is modified by MediaTek Inc. and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*******************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* l1_tool.h
*
* Project:
* --------
* Maui_Software
*
* Description:
* ------------
* Layer1 core global tools
*
* Author:
* -------
* -------
* -------
*
*------------------------------------------------------------------------------
* $Revision: 1.11 $
* $Modtime: Jul 19 2005 17:19:28 $
* $Log: //mtkvs01/vmdata/Maui_sw/archives/mcu/l1/common/l1_tool.h-arc $
*
* 06 04 2018 priyanshi.jain
* [MOLY00330249] ELT????-???? GSM?????? SNR?
*
* UMOLYE Real SNR
*
* 12 18 2015 terence.chen
* [MOLY00153957] [UMOLY] Sync code from LR11 to UMOLY
* Sync GL1A/C and RTB code from LR11.
*
* 12 04 2014 rick.wu
* [MOLY00083549] [MT6291] Merge GL1 codes from MT6291_DEV to UMOLY
* Fix build error
*
* 05 23 2014 rick.wu
* [MOLY00063424] [TK6291][L1S][GL1AC] U3G code check in for L1S load
* .
*
* 01 23 2014 rick.wu
* [MOLY00054324] [4G Gemini][Merge] MOLY.MM.GEMINI.DEV Merge back to MOLY
* .
*
* 01 22 2014 hsin-chun.chen
* [MOLY00054353] Mapping GAS_n to GL1_n in SGLTE and SGLTE DSDS in accordance with MM.GEMINI check in
* <saved by Perforce>
*
* 03 19 2012 william.lin
* removed!
* .
*
* 03 13 2012 william.lin
* removed!
* .
*
* 03 12 2012 william.lin
* removed!
* .
*
* 01 17 2012 william.lin
* removed!
* .
*
* 06 08 2011 samuel.yang
* removed!
* .
*
* 06 08 2011 jp.lien
* removed!
* .
*
* 04 12 2011 sy.yeh
* removed!
* .
*
* 02 07 2011 yr.chiang
* removed!
* .
*
* 12 15 2010 jp.lien
* removed!
* .
*
* 12 15 2010 chang-kuan.lin
* removed!
* .
*
* 08 08 2010 yr.chiang
* removed!
* .
*
* removed!
* removed!
*
*
* removed!
* removed!
* Fix L1D build warnings for RVCT31
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
* For L1D code revision
*
* removed!
* removed!
*
*
* removed!
* removed!
*
*
* removed!
* removed!
* add to source control recursely
*
* removed!
* removed!
* Seperate l1_tool.h to l1_tool.h + tool.h
*
* removed!
* removed!
*
*
* removed!
* removed!
* Checkin L1C dual mode source codes
*
* removed!
* removed!
*
*
* Rev 1.11 Jul 19 2005 17:24:20 mtk00674
* Fix compile error in simulation for AMR to add MT6228 / MT6227 compile option
* Resolution for 12011: [L1C][update] For AMR simulation tp add MT6228 / MT6227 compile option
*
* Rev 1.10 May 17 2005 00:33:12 BM_Trunk
* Karlos:
* add copyright and disclaimer statement
*
* Rev 1.9 Jan 26 2005 17:47:16 mtk00248
* Add ScanInt8 and ScanInt8Range.
*
* Rev 1.8 Jan 18 2005 00:37:12 BM
* append new line in W05.04
*
* Rev 1.7 May 03 2004 17:41:38 mtk00474
* Reason:
* for L1A simulation environment
* Solution:
* Add ASSERT before kal_mem_cpy to avoid copy the non-sense freq. list members to L1C
* Sync. some parameters of some sub-routines of simulated-files to real files.
* Verify:
* Run the simulation tool
*
* Resolution for 5259: update L1A simulation environment
*
* Rev 1.6 May 22 2003 17:25:56 mtk00274
* Add L1_PowerAveragerPutPt to calculate one second running average in packet transfer mode.
* Resolution for 1606: [L1C][Update]Add TA value debug code on PTCCH channel handler.
*
* Rev 1.5 05 Mar 2003 14:42:42 mtk00276
* Not to use "__HW_DIVIDER__" compile option.
* Resolution for 1125: Dividers checkin
*
* Rev 1.4 03 Mar 2003 17:52:48 mtk00276
* Divider checkin
* Resolution for 1125: Dividers checkin
*
* Rev 1.3 03 Mar 2003 17:26:04 mtk00276
* Divider checkin
* Resolution for 1125: Dividers checkin
*
* Rev 1.2 03 Mar 2003 17:23:08 mtk00276
* Divider checkin.
* Resolution for 1125: Dividers checkin
*
* Rev 1.1 28 Jan 2003 10:54:06 mtk00276
* Add check SIM function for turbo sleep mode and smart HO mechanism. If test SIM presents(or SIM type unknown), we
* shall disable turbo sleep mode(not to delay report handling),
* and shall not enable smart HO mechanism.
* Resolution for 774: Add check SIM function for turbo sleep mode and smart HO mechanism
*
* Rev 1.0 Nov 30 2002 19:50:14 admin
* Initial revision.
*
* Rev 1.2 20 Sep 2002 14:54:48 mtk00248
* Add compile option to the following code:
* void ConsolePrintf( const char* format, ... );
* void ConsoleVPrintf( const char* format, va_list args );
* void ConsoleFlush( void );
* void ConsolePutchar( char c );
*
* Rev 1.1 11 Sep 2002 16:02:08 mtk00274
* Merge Albert's code.
*
* Rev 1.0 Sep 06 2002 11:18:58 admin
* Initial revision.
*
* Rev 1.5 Jul 04 2002 23:35:00 mtk00210
* Enhance L1 assert and display message on LCD on target environment
*
* Rev 1.4 Apr 29 2002 08:58:28 mtk00274
* Send ReportReportPeriodDone when first PCH is received to resolve GSM11.10 test case 20.6
*
* Rev 1.3 Jan 24 2002 15:21:12 mtk00274
* Fix the data type of L1_PowerAveragerGet() from int16 to int32
*
* Rev 1.2 Jan 03 2002 11:52:26 mtk00210
* merge the branch B.L1.20011225
*
* Rev 1.1.1.1 Dec 27 2001 10:52:48 mtk00210
* correct author
*
* Rev 1.1.1.0 Dec 25 2001 16:40:20 mtk00210
* revise L1 for RSSI, multiband AFC, new L1D/L1C interface,
* and new CBCH handler
*
* Rev 1.1 Dec 21 2001 12:17:42 admin
* add copyright
*
*
*******************************************************************************/
/******************************************************************************
*
* File: /MTKteam/source/gprsmtk/l1/generic/SCCS/s.l1_tool.h
* -----
*
* SCCS Version: 2.14
* -------------
*
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of Communications Consultants Worldwide Limited (C) 2001
*
* Project:
* --------
*
* Software Unit: Layer1 core global tools.
* --------------
*
* Description:
* ------------
*
*
* Modification History:
* ---------------------
* Date Vers Auth Details
* ---- ---- ---- -------
* 28-Mar-01 2.1 VKL Initial version
* 17-Apr-01 2.2 VKL added L1_FrameNumberMod52 and L1_FrameNumberDiv
* 25-Apr-01 2.3 APB Add PromoteScriptHandler()
* 27-Apr-01 2.4 VKL Moved ring buffer handling from
* generic/l1_core_private.h to generic/l1_tool.h
* Moved hardware read and write macros from
* simulation/generic/simul_public.h to
* generic/l1_tool.h
* Fixed L1_FrameNumberDiv1326()
* 01-May-01 2.5 VKL Simplify RB_COUNT
* 21-May-01 2.6 VKL added L1_FrameNumberDiv52
* 1-May-01 2.7 APB Add ScanPrintChk() reference
* 15-Jul-01 2.8 VKL Added L1_FrameNumberMod104()
* 21-Sep-01 2.9 VKL Added RB_PEEK and RB_CONSUME
* 1-Oct-01 2.10 SGB Fix merge error
* 1-Oct-01 2.11 VKL Add ScanTSC()
* 11-Oct-01 2.12 SY Add ScanUlTxPower()
* 12-Oct-01 2.13 SGB Fix merge error
* 26-Oct-01 2.14 VKL Add power averager
* 9-Nov-01 2.15 APB Add TRACEC7 - 11
* 9-Nov-01 2.16 VKL Add L1_PowerAveragerAverageWithLast()
* 15-Nov-01 2.17 APB Add ScanEOL
* 04-Dec-01 2.18 VKL Make rinbuffer members volatile
* Fix non simulated HW_WRITE and HW_READ
*
*****************************************************************************/
#ifndef l1_generic_l1_tool_h
#define l1_generic_l1_tool_h
//#include "divider_public.h" Remove from U3G
#include "mph_types.h"
#include "l1_types.h"
#include "l1_types_public.h"
#include "l1_core_private.h"
#include "kal_general_types.h"
#include "event_info_utility.h"
/* --- frame numbers arithmetic -------------------------------------------- */
FrameNumber L1_FrameNumberAdd( FrameNumber a, int32 b );
FrameNumber L1_FrameNumberSub( FrameNumber a, int32 b );
int32 L1_FrameNumberDiff( FrameNumber a, FrameNumber b );
#define L1_FrameNumberMod(a,b) ((intx)((a)%(b)))
#define L1_FrameNumberMod13( a ) ((intx)((a)%13))
#define L1_FrameNumberMod26( a ) ((intx)((a)%26))
#define L1_FrameNumberMod51( a ) ((intx)((a)%51))
#define L1_FrameNumberMod52( a ) ((intx)((a)%52))
#define L1_FrameNumberMod102( a ) ((intx)((a)%102))
#define L1_FrameNumberMod104( a ) ((intx)((a)%104))
#define L1_FrameNumberDiv( a, b ) ((a)/(b))
#define L1_FrameNumberDiv26( a ) ((a)/26)
#define L1_FrameNumberDiv51( a ) ((a)/51)
#define L1_FrameNumberDiv52( a ) ((a)/52)
#define L1_FrameNumberDiv1326( a ) ((a)/1326)
/* --- time arithmetic ----------------------------------------------------- */
void L1_TimeAddWhileEBits( Time* time, intx ebits );
void L1_TimeAddEBits( Time *time, intx ebits );
void L1_TimeSubEBits( Time *time, intx ebits );
void L1_TimeAdd( Time *time, FrameNumber frame, intx ebits );
void L1_TimeSub( Time *time, FrameNumber frame, intx ebits );
void L1_TimeNormalise( Time *time );
bool L1_TimeOutCheck ( uint32 startTime, uint32 duartion );
/* --- calculation of RLA_C ------------------------------------------------ */
void L1_PowerAveragerReset( PowerAverager *a , SurroundMode mode );
void L1_PowerAveragerPut( PowerAverager *a, Power power, kal_uint8 min_sample );
void L1_PowerAveragerPutPt( PowerAverager *a, Power power );
void L1_PowerAveragerAverageWithLast( PowerAverager *a, Power power );
void L1_PowerAveragerGet( PowerAverager *a, PowerSum32 *power, kal_uint8 min_sample );
void L1_SNRAveragerGet(SNRAverager *s,kal_int16 *snr);
void L1_SNRAveragerPut(SNRAverager *s,kal_int16 snr);
/* --- Idenify SIM1/SIM2 report -------------------------------------------- */
#if !defined(__GL1_GEMINI__)
#define GET_SIM_X_FROM_REPORT(_report) (0) /*0->SIM1*/
#define GET_SIM_X_FROM_HS(hs) (0)
#else
#define GET_SIM_X_FROM_REPORT(_report) (uint8)((_report->type & REPORT_SIM_MASK)>> 7) /*0->SIM1, 1->SIM2, 2->SIM3, 3->SIM4 */
#define GET_SIM_X_FROM_HS(hs) (hs->simIndex)
#endif
/*For show trace in catcher, SIM1: "[SIM1]xxxx" */
#define SIM_MODE_STR(_mode) (_mode + 1)
#define RTB_MODE_STR (L1C_SIM1 + 1)
#define DEFAULT_SIM_MODE_STR (L1C_SIM1 + 1)
/* --- Dispatch L1C trace message---------------------- */
#ifdef __GL1_GEMINI__
#define L1C_MSG_14(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)\
{ msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14); }
#define L1C_MSG_13(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)\
{ msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); }
#define L1C_MSG_12(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)\
{ msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v12); }
#define L1C_MSG_11(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)\
{ msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); }
#define L1C_MSG_10(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); }
#define L1C_MSG_9(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9); }
#define L1C_MSG_8(msg, v1, v2, v3, v4, v5, v6, v7, v8)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8); }
#define L1C_MSG_7(msg, v1, v2, v3, v4, v5, v6, v7)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7); }
#define L1C_MSG_6(msg, v1, v2, v3, v4, v5, v6)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6); }
#define L1C_MSG_5(msg, v1, v2, v3, v4, v5)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5); }
#define L1C_MSG_4( msg, v1, v2, v3, v4)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4); }
#define L1C_MSG_3( msg, v1, v2, v3)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3); }
#define L1C_MSG_2( msg, v1, v2)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1, v2); }
#define L1C_MSG_1( msg, v1)\
{ msg(SIM_MODE_STR(l1c_sim_mode), v1); }
#define L1C_MSG_0( msg)\
{ msg(SIM_MODE_STR(l1c_sim_mode)); }
#else /*__GL1_GEMINI__*/
#define L1C_MSG_14(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);}
#define L1C_MSG_13(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);}
#define L1C_MSG_12(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);}
#define L1C_MSG_11(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);}
#define L1C_MSG_10(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);}
#define L1C_MSG_9(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9);}
#define L1C_MSG_8(msg, v1, v2, v3, v4, v5, v6, v7, v8) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8);}
#define L1C_MSG_7(msg, v1, v2, v3, v4, v5, v6, v7) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7);}
#define L1C_MSG_6(msg, v1, v2, v3, v4, v5, v6) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6);}
#define L1C_MSG_5(msg, v1, v2, v3, v4, v5) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5);}
#define L1C_MSG_4(msg, v1, v2, v3, v4) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4);}
#define L1C_MSG_3(msg, v1, v2, v3) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3);}
#define L1C_MSG_2(msg, v1, v2) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2);}
#define L1C_MSG_1(msg, v1) {msg(SIM_MODE_STR(L1C_SIM1), v1);}
#define L1C_MSG_0(msg) {msg(SIM_MODE_STR(L1C_SIM1));}
#endif /*__GL1_GEMINI__*/
/* --- Utility Macro ------------------------------------------------------- */
/*Please be careful about the datatype of the input parameter!! */
#define L1_CHK_BIT(a, bit) ( (a) & (1 << bit))
#define L1_SET_BIT(a, bit) ( (a) |= (1 << bit))
#define L1_CLR_BIT(a, bit) ( (a) &= ~(1 << bit))
/* --- Original stuff move to tool.h for 3G to include---------------------- */
#include "tool.h"
/* --- specialities ------------------------------------------------------- */
bool ScanPrintChk( void );
bool ScanCommand( const char *value );
bool ScanPower( Power *power );
bool ScanTA( TimingAdvance *ta );
bool ScanTimeSlot( TimeSlot *timeSlot );
bool ScanARFCN( ARFCN *arfcn );
bool ScanFrameOffset( FrameNumber *frameOffset );
bool ScanEBitOffset( intx *ebitOffset );
bool ScanBSIC( BSIC *bsic );
bool ScanTSC( TSC *tsc );
bool ScanFrame( FrameNumber *frame, int32 min );
bool ScanUlTxPower( Power *power );
/*------------------- L1A ASSERT --------------------------------------*/
/*[MAUI_03118234] L1 ASSERT Review
A. L1A(_EXT)_ASSERT_Reboot: reboot in both MTK internal & customer release
(L1A_ASSERT_Reboot will be ignored in slim, L1A_EXT_ASSERT_Reboot will reboot in slim)
B. L1A(_EXT)_ASSERT_Bypass_Trace: no reboot, but output warning message in system trace
C. L1A(_EXT)_ASSERT_Bypass: reboot in MTK internal, ignore in customer release
*/
#define L1A_ASSERT_Bypass( st ) (void)0
#define L1A_ASSERT_Bypass_Trace( st ) if(!(st)) MODEM_WARNING_MESSAGE(0, "[L1A]")
#define L1A_ASSERT_Reboot( st ) if(!(st)) ASSERT(0)
#define L1A_EXT_ASSERT_Bypass( st, d1, d2, d3 ) (void)0
#define L1A_EXT_ASSERT_Bypass_Trace( st, d1, d2, d3 ) if(!(st)) MODEM_WARNING_MESSAGE(0, "[L1A] var1:%d, var2:%d, var3:%d", d1, d2, d3)
#define L1A_EXT_ASSERT_Reboot( st, d1, d2, d3 ) if(!(st)) EXT_ASSERT(0, d1, d2, d3 )
#ifdef __MTK_INTERNAL__
#undef L1A_ASSERT_Bypass
#undef L1A_EXT_ASSERT_Bypass
#define L1A_ASSERT_Bypass( st ) if(!(st)) ASSERT(0)
#define L1A_EXT_ASSERT_Bypass( st, d1, d2, d3 ) if(!(st)) EXT_ASSERT(0, d1, d2, d3 )
#endif
#ifdef L1_SIM
#undef L1A_ASSERT_Bypass_Trace
#undef L1A_EXT_ASSERT_Bypass_Trace
#define L1A_ASSERT_Bypass_Trace( st ) if(!(st)) ASSERT(0)
#define L1A_EXT_ASSERT_Bypass_Trace( st, d1, d2, d3 ) if(!(st)) EXT_ASSERT(0, d1, d2, d3 )
#endif
#endif // l1_generic_l1_tool_h