/******************************************************************************/
// @copyright   Copyright Notification
//   No part may be reproduced except as authorized by written permission.
//   The copyright and the foregoing restriction extend to reproduction in all media.
//   Trademark 2010, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC).
//   All rights reserved.
// @version: IWD_10wk37
// $Date: 2010-09-16 23:11:35 +0200 (Thu, 16 Sep 2010) $
// $Rev: 3943 $
/******************************************************************************/
module MAC_Templates {
//=========================================================================
// Import Part
//=========================================================================

  import from CommonDefs all;
  import from EUTRA_ASP_TypeDefs all;
  import from EUTRA_AspCommon_Templates all;
  import from EUTRA_CommonDefs all;
  import from EUTRA_CellCfg_Templates all;
  import from EUTRA_RRC_ASN1_Definitions language "ASN.1:1997" all;
  import from EUTRA_RRC_Templates all;
  import from EUTRA_ASP_DrbDefs all;
  import from EUTRA_DRB_Templates all;
  import from L2_CommonTemplates all;
  import from EUTRA_CellInfo  all;
  import from EUTRA_Measurement_Templates  all; // R5-104535


  //=========================================================================
  // Template groups
  //=========================================================================
  group Constants {

  const integer tsc_SubframeOffset0 := 0;                       /* @status    APPROVED */

  const B1_Type  tsc_ExtensionMoreHeaders := '1'B;              /* @status    APPROVED */
  const B1_Type  tsc_ExtensionNoMoreHeaders := '0'B;            /* @status    APPROVED */
  const B5_Type  tsc_LchId_TA := '11101'B;                      /* @status    APPROVED */
  const B2_Type  tsc_Framing00 := '00'B;                        /* @status    APPROVED */
  const B5_Type  tsc_LchId_DRB1 := '00011'B;                    /* @status    APPROVED */
  const B5_Type  tsc_LchId_DRB3 := '00101'B;                    /* @status    APPROVED */
  const B5_Type  tsc_LchId_CRNTI :='11011'B;                    /* @status    APPROVED */
  const B5_Type  tsc_LchId_TruncatedBSR := '11100'B;            /* @status    APPROVED */
  const B5_Type  tsc_LchId_ShortBSR := '11101'B;                /* @status    APPROVED */
  const B5_Type  tsc_LchId_LongBSR := '11110'B;                 /* @status    APPROVED */
  const B5_Type  tsc_LchId_DRX := '11110'B;                     /* @status    APPROVED */
  const B1_Type  tsc_Poll := '1'B;                              /* @status    APPROVED */
  const B1_Type  tsc_NoPoll  := '0'B;                           /* @status    APPROVED */
  const B12_Type tsc_B12_SQN0 := int2bit(0,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN1 := int2bit(1,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN2 := int2bit(2,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN3 := int2bit(3,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN4 := int2bit(4,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN5 := int2bit(5,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN6 := int2bit(6,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN7 := int2bit(7,12);                 /* @status    APPROVED */
  const B12_Type tsc_B12_SQN8 := int2bit(8,12);                 /* @status    APPROVED */
  const B5_Type tsc_LchId_Padding  := '11111'B;                 /* @status    APPROVED */
  const B5_Type tsc_LchId_DRB2 := '00100'B;                     /* @status    APPROVED */
  const PDCP_SDU_Type tsc_Empty := ''O;
  const  B6_Type tsc_BS_0        :='000000'B;                   /* @status    APPROVED */
  const  B6_Type tsc_BS_0to10    :='000001'B;
  const  B6_Type tsc_BS_10to12   :='000010'B;
  const  B6_Type tsc_BS_12to14   :='000011'B;
  const  B1_Type tsc_NDI0 := '0'B;
  const  B1_Type tsc_NDI1 := '1'B;
  

  }; // End of group constants



  //36.213 Table 7.1.7.2.1-1: Transport block size table (dimension 110x27)

  type integer Nprb_Itbs_Type[1..110][0..26];  /* @status    APPROVED */

  const Nprb_Itbs_Type tsc_Nprb_Itbs := {  /* @status    APPROVED */
{16 ,24 ,32 ,40 ,56 ,72 ,328    ,104    ,120    ,136    ,144    ,176    ,208    ,224    ,256    ,280    ,328    ,336    ,376    ,408    ,440    ,488    ,520    ,552    ,584    ,616    ,712    },
{32 ,56 ,72 ,104    ,120    ,144    ,176    ,224    ,256    ,296    ,328    ,376    ,440    ,488    ,552    ,600    ,632    ,696    ,776    ,840    ,904    ,1000   ,1064   ,1128   ,1192   ,1256   ,1480   },
{56 ,88 ,144    ,176    ,208    ,224    ,256    ,328    ,392    ,456    ,504    ,584    ,680    ,744    ,840    ,904    ,968    ,1064   ,1160   ,1288   ,1384   ,1480   ,1608   ,1736   ,1800   ,1864   ,2216   },
{88 ,144    ,176    ,208    ,256    ,328    ,392    ,472    ,536    ,616    ,680    ,776    ,904    ,1000   ,1128   ,1224   ,1288   ,1416   ,1544   ,1736   ,1864   ,1992   ,2152   ,2280   ,2408   ,2536   ,2984   },
{120    ,176    ,208    ,256    ,328    ,424    ,504    ,584    ,680    ,776    ,872    ,1000   ,1128   ,1256   ,1416   ,1544   ,1608   ,1800   ,1992   ,2152   ,2344   ,2472   ,2664   ,2856   ,2984   ,3112   ,3752   },
{152    ,208    ,256    ,328    ,408    ,504    ,600    ,712    ,808    ,936    ,1032   ,1192   ,1352   ,1544   ,1736   ,1800   ,1928   ,2152   ,2344   ,2600   ,2792   ,2984   ,3240   ,3496   ,3624   ,3752   ,4392   },
{176    ,224    ,296    ,392    ,488    ,600    ,712    ,840    ,968    ,1096   ,1224   ,1384   ,1608   ,1800   ,1992   ,2152   ,2280   ,2536   ,2792   ,2984   ,3240   ,3496   ,3752   ,4008   ,4264   ,4392   ,5160   },
{208    ,256    ,328    ,440    ,552    ,680    ,808    ,968    ,1096   ,1256   ,1384   ,1608   ,1800   ,2024   ,2280   ,2472   ,2600   ,2856   ,3112   ,3496   ,3752   ,4008   ,4264   ,4584   ,4968   ,5160   ,5992   },
{224    ,328    ,376    ,504    ,632    ,776    ,936    ,1096   ,1256   ,1416   ,1544   ,1800   ,2024   ,2280   ,2600   ,2728   ,2984   ,3240   ,3624   ,3880   ,4136   ,4584   ,4776   ,5160   ,5544   ,5736   ,6712   },
{256    ,344    ,424    ,568    ,696    ,872    ,1032   ,1224   ,1384   ,1544   ,1736   ,2024   ,2280   ,2536   ,2856   ,3112   ,3240   ,3624   ,4008   ,4264   ,4584   ,4968   ,5352   ,5736   ,5992   ,6200   ,7480   },
{288    ,376    ,472    ,616    ,776    ,968    ,1128   ,1320   ,1544   ,1736   ,1928   ,2216   ,2472   ,2856   ,3112   ,3368   ,3624   ,4008   ,4392   ,4776   ,5160   ,5544   ,5992   ,6200   ,6712   ,6968   ,8248   },
{328    ,424    ,520    ,680    ,840    ,1032   ,1224   ,1480   ,1672   ,1864   ,2088   ,2408   ,2728   ,3112   ,3496   ,3624   ,3880   ,4392   ,4776   ,5160   ,5544   ,5992   ,6456   ,6968   ,7224   ,7480   ,8760   },
{344    ,456    ,568    ,744    ,904    ,1128   ,1352   ,1608   ,1800   ,2024   ,2280   ,2600   ,2984   ,3368   ,3752   ,4008   ,4264   ,4776   ,5160   ,5544   ,5992   ,6456   ,6968   ,7480   ,7992   ,8248   ,9528   },
{376    ,488    ,616    ,808    ,1000   ,1224   ,1480   ,1672   ,1928   ,2216   ,2472   ,2792   ,3240   ,3624   ,4008   ,4264   ,4584   ,5160   ,5544   ,5992   ,6456   ,6968   ,7480   ,7992   ,8504   ,8760   ,10296  },
{392    ,520    ,648    ,872    ,1064   ,1320   ,1544   ,1800   ,2088   ,2344   ,2664   ,2984   ,3368   ,3880   ,4264   ,4584   ,4968   ,5352   ,5992   ,6456   ,6968   ,7480   ,7992   ,8504   ,9144   ,9528   ,11064  },
{424    ,568    ,696    ,904    ,1128   ,1384   ,1672   ,1928   ,2216   ,2536   ,2792   ,3240   ,3624   ,4136   ,4584   ,4968   ,5160   ,5736   ,6200   ,6968   ,7480   ,7992   ,8504   ,9144   ,9912   ,10296  ,11832  },
{456    ,600    ,744    ,968    ,1192   ,1480   ,1736   ,2088   ,2344   ,2664   ,2984   ,3496   ,3880   ,4392   ,4968   ,5160   ,5544   ,6200   ,6712   ,7224   ,7992   ,8504   ,9144   ,9912   ,10296  ,10680  ,12576  },
{488    ,632    ,776    ,1032   ,1288   ,1544   ,1864   ,2216   ,2536   ,2856   ,3112   ,3624   ,4136   ,4584   ,5160   ,5544   ,5992   ,6456   ,7224   ,7736   ,8248   ,9144   ,9528   ,10296  ,11064  ,11448  ,13536  },
{504    ,680    ,840    ,1096   ,1352   ,1672   ,1992   ,2344   ,2664   ,2984   ,3368   ,3880   ,4392   ,4968   ,5544   ,5736   ,6200   ,6712   ,7480   ,8248   ,8760   ,9528   ,10296  ,11064  ,11448  ,12216  ,14112  },
{536    ,712    ,872    ,1160   ,1416   ,1736   ,2088   ,2472   ,2792   ,3112   ,3496   ,4008   ,4584   ,5160   ,5736   ,6200   ,6456   ,7224   ,7992   ,8504   ,9144   ,9912   ,10680  ,11448  ,12216  ,12576  ,14688  },
{568    ,744    ,936    ,1224   ,1480   ,1864   ,2216   ,2536   ,2984   ,3368   ,3752   ,4264   ,4776   ,5352   ,5992   ,6456   ,6712   ,7480   ,8248   ,9144   ,9912   ,10680  ,11448  ,12216  ,12960  ,13536  ,15264  },
{600    ,776    ,968    ,1256   ,1544   ,1928   ,2280   ,2664   ,3112   ,3496   ,3880   ,4392   ,4968   ,5736   ,6200   ,6712   ,7224   ,7992   ,8760   ,9528   ,10296  ,11064  ,11832  ,12576  ,13536  ,14112  ,16416  },
{616    ,808    ,1000   ,1320   ,1608   ,2024   ,2408   ,2792   ,3240   ,3624   ,4008   ,4584   ,5352   ,5992   ,6456   ,6968   ,7480   ,8248   ,9144   ,9912   ,10680  ,11448  ,12576  ,12960  ,14112  ,14688  ,16992  },
{648    ,872    ,1064   ,1384   ,1736   ,2088   ,2472   ,2984   ,3368   ,3752   ,4264   ,4776   ,5544   ,6200   ,6968   ,7224   ,7736   ,8760   ,9528   ,10296  ,11064  ,12216  ,12960  ,13536  ,14688  ,15264  ,17568  },
{680    ,904    ,1096   ,1416   ,1800   ,2216   ,2600   ,3112   ,3496   ,4008   ,4392   ,4968   ,5736   ,6456   ,7224   ,7736   ,7992   ,9144   ,9912   ,10680  ,11448  ,12576  ,13536  ,14112  ,15264  ,15840  ,18336  },
{712    ,936    ,1160   ,1480   ,1864   ,2280   ,2728   ,3240   ,3624   ,4136   ,4584   ,5352   ,5992   ,6712   ,7480   ,7992   ,8504   ,9528   ,10296  ,11064  ,12216  ,12960  ,14112  ,14688  ,15840  ,16416  ,19080  },
{744    ,968    ,1192   ,1544   ,1928   ,2344   ,2792   ,3368   ,3752   ,4264   ,4776   ,5544   ,6200   ,6968   ,7736   ,8248   ,8760   ,9912   ,10680  ,11448  ,12576  ,13536  ,14688  ,15264  ,16416  ,16992  ,19848  },
{776    ,1000   ,1256   ,1608   ,1992   ,2472   ,2984   ,3368   ,3880   ,4392   ,4968   ,5736   ,6456   ,7224   ,7992   ,8504   ,9144   ,10296  ,11064  ,12216  ,12960  ,14112  ,15264  ,15840  ,16992  ,17568  ,20616  },
{776    ,1032   ,1288   ,1672   ,2088   ,2536   ,2984   ,3496   ,4008   ,4584   ,5160   ,5992   ,6712   ,7480   ,8248   ,8760   ,9528   ,10296  ,11448  ,12576  ,13536  ,14688  ,15840  ,16416  ,17568  ,18336  ,21384  },
{808    ,1064   ,1320   ,1736   ,2152   ,2664   ,3112   ,3624   ,4264   ,4776   ,5352   ,5992   ,6712   ,7736   ,8504   ,9144   ,9912   ,10680  ,11832  ,12960  ,14112  ,15264  ,16416  ,16992  ,18336  ,19080  ,22152  },
{840    ,1128   ,1384   ,1800   ,2216   ,2728   ,3240   ,3752   ,4392   ,4968   ,5544   ,6200   ,6968   ,7992   ,8760   ,9528   ,9912   ,11064  ,12216  ,13536  ,14688  ,15840  ,16992  ,17568  ,19080  ,19848  ,22920  },
{872    ,1160   ,1416   ,1864   ,2280   ,2792   ,3368   ,3880   ,4584   ,5160   ,5736   ,6456   ,7224   ,8248   ,9144   ,9912   ,10296  ,11448  ,12576  ,13536  ,14688  ,15840  ,16992  ,18336  ,19848  ,20616  ,23688  },
{904    ,1192   ,1480   ,1928   ,2344   ,2856   ,3496   ,4008   ,4584   ,5160   ,5736   ,6712   ,7480   ,8504   ,9528   ,10296  ,10680  ,11832  ,12960  ,14112  ,15264  ,16416  ,17568  ,19080  ,19848  ,20616  ,24496  },
{936    ,1224   ,1544   ,1992   ,2408   ,2984   ,3496   ,4136   ,4776   ,5352   ,5992   ,6968   ,7736   ,8760   ,9912   ,10296  ,11064  ,12216  ,13536  ,14688  ,15840  ,16992  ,18336  ,19848  ,20616  ,21384  ,25456  },
{968    ,1256   ,1544   ,2024   ,2472   ,3112   ,3624   ,4264   ,4968   ,5544   ,6200   ,6968   ,7992   ,9144   ,9912   ,10680  ,11448  ,12576  ,14112  ,15264  ,16416  ,17568  ,19080  ,19848  ,21384  ,22152  ,25456  },
{1000   ,1288   ,1608   ,2088   ,2600   ,3112   ,3752   ,4392   ,4968   ,5736   ,6200   ,7224   ,8248   ,9144   ,10296  ,11064  ,11832  ,12960  ,14112  ,15264  ,16992  ,18336  ,19080  ,20616  ,22152  ,22920  ,26416  },
{1032   ,1352   ,1672   ,2152   ,2664   ,3240   ,3880   ,4584   ,5160   ,5736   ,6456   ,7480   ,8504   ,9528   ,10680  ,11448  ,12216  ,13536  ,14688  ,15840  ,16992  ,18336  ,19848  ,21384  ,22920  ,23688  ,27376  },
{1032   ,1384   ,1672   ,2216   ,2728   ,3368   ,4008   ,4584   ,5352   ,5992   ,6712   ,7736   ,8760   ,9912   ,11064  ,11832  ,12216  ,13536  ,15264  ,16416  ,17568  ,19080  ,20616  ,22152  ,22920  ,24496  ,28336  },
{1064   ,1416   ,1736   ,2280   ,2792   ,3496   ,4136   ,4776   ,5544   ,6200   ,6712   ,7736   ,8760   ,9912   ,11064  ,11832  ,12576  ,14112  ,15264  ,16992  ,18336  ,19848  ,21384  ,22152  ,23688  ,24496  ,29296  },
{1096   ,1416   ,1800   ,2344   ,2856   ,3496   ,4136   ,4968   ,5544   ,6200   ,6968   ,7992   ,9144   ,10296  ,11448  ,12216  ,12960  ,14688  ,15840  ,16992  ,18336  ,19848  ,21384  ,22920  ,24496  ,25456  ,29296  },
{1128   ,1480   ,1800   ,2408   ,2984   ,3624   ,4264   ,4968   ,5736   ,6456   ,7224   ,8248   ,9528   ,10680  ,11832  ,12576  ,13536  ,14688  ,16416  ,17568  ,19080  ,20616  ,22152  ,23688  ,25456  ,26416  ,30576  },
{1160   ,1544   ,1864   ,2472   ,2984   ,3752   ,4392   ,5160   ,5992   ,6712   ,7480   ,8504   ,9528   ,10680  ,12216  ,12960  ,13536  ,15264  ,16416  ,18336  ,19848  ,21384  ,22920  ,24496  ,25456  ,26416  ,30576  },
{1192   ,1544   ,1928   ,2536   ,3112   ,3752   ,4584   ,5352   ,5992   ,6712   ,7480   ,8760   ,9912   ,11064  ,12216  ,12960  ,14112  ,15264  ,16992  ,18336  ,19848  ,21384  ,22920  ,24496  ,26416  ,27376  ,31704  },
{1224   ,1608   ,1992   ,2536   ,3112   ,3880   ,4584   ,5352   ,6200   ,6968   ,7736   ,8760   ,9912   ,11448  ,12576  ,13536  ,14112  ,15840  ,17568  ,19080  ,20616  ,22152  ,23688  ,25456  ,26416  ,28336  ,32856  },
{1256   ,1608   ,2024   ,2600   ,3240   ,4008   ,4776   ,5544   ,6200   ,6968   ,7992   ,9144   ,10296  ,11448  ,12960  ,13536  ,14688  ,16416  ,17568  ,19080  ,20616  ,22920  ,24496  ,25456  ,27376  ,28336  ,32856  },
{1256   ,1672   ,2088   ,2664   ,3240   ,4008   ,4776   ,5736   ,6456   ,7224   ,7992   ,9144   ,10680  ,11832  ,12960  ,14112  ,14688  ,16416  ,18336  ,19848  ,21384  ,22920  ,24496  ,26416  ,28336  ,29296  ,34008  },
{1288   ,1736   ,2088   ,2728   ,3368   ,4136   ,4968   ,5736   ,6456   ,7480   ,8248   ,9528   ,10680  ,12216  ,13536  ,14688  ,15264  ,16992  ,18336  ,20616  ,22152  ,23688  ,25456  ,27376  ,28336  ,29296  ,35160  },
{1320   ,1736   ,2152   ,2792   ,3496   ,4264   ,4968   ,5992   ,6712   ,7480   ,8504   ,9528   ,11064  ,12216  ,13536  ,14688  ,15840  ,17568  ,19080  ,20616  ,22152  ,24496  ,25456  ,27376  ,29296  ,30576  ,35160  },
{1352   ,1800   ,2216   ,2856   ,3496   ,4392   ,5160   ,5992   ,6968   ,7736   ,8504   ,9912   ,11064  ,12576  ,14112  ,15264  ,15840  ,17568  ,19080  ,21384  ,22920  ,24496  ,26416  ,28336  ,29296  ,31704  ,36696  },
{1384   ,1800   ,2216   ,2856   ,3624   ,4392   ,5160   ,6200   ,6968   ,7992   ,8760   ,9912   ,11448  ,12960  ,14112  ,15264  ,16416  ,18336  ,19848  ,21384  ,22920  ,25456  ,27376  ,28336  ,30576  ,31704  ,36696  },
{1416   ,1864   ,2280   ,2984   ,3624   ,4584   ,5352   ,6200   ,7224   ,7992   ,9144   ,10296  ,11832  ,12960  ,14688  ,15840  ,16416  ,18336  ,19848  ,22152  ,23688  ,25456  ,27376  ,29296  ,31704  ,32856  ,37888  },
{1416   ,1864   ,2344   ,2984   ,3752   ,4584   ,5352   ,6456   ,7224   ,8248   ,9144   ,10680  ,11832  ,13536  ,14688  ,15840  ,16992  ,19080  ,20616  ,22152  ,24496  ,26416  ,28336  ,29296  ,31704  ,32856  ,37888  },
{1480   ,1928   ,2344   ,3112   ,3752   ,4776   ,5544   ,6456   ,7480   ,8248   ,9144   ,10680  ,12216  ,13536  ,15264  ,16416  ,16992  ,19080  ,21384  ,22920  ,24496  ,26416  ,28336  ,30576  ,32856  ,34008  ,39232  },
{1480   ,1992   ,2408   ,3112   ,3880   ,4776   ,5736   ,6712   ,7480   ,8504   ,9528   ,11064  ,12216  ,14112  ,15264  ,16416  ,17568  ,19848  ,21384  ,22920  ,25456  ,27376  ,29296  ,30576  ,32856  ,34008  ,40576  },
{1544   ,1992   ,2472   ,3240   ,4008   ,4776   ,5736   ,6712   ,7736   ,8760   ,9528   ,11064  ,12576  ,14112  ,15840  ,16992  ,17568  ,19848  ,22152  ,23688  ,25456  ,27376  ,29296  ,31704  ,34008  ,35160  ,40576  },
{1544   ,2024   ,2536   ,3240   ,4008   ,4968   ,5992   ,6712   ,7736   ,8760   ,9912   ,11448  ,12576  ,14688  ,15840  ,16992  ,18336  ,20616  ,22152  ,24496  ,26416  ,28336  ,30576  ,31704  ,34008  ,35160  ,40576  },
{1608   ,2088   ,2536   ,3368   ,4136   ,4968   ,5992   ,6968   ,7992   ,9144   ,9912   ,11448  ,12960  ,14688  ,16416  ,17568  ,18336  ,20616  ,22920  ,24496  ,26416  ,28336  ,30576  ,32856  ,35160  ,36696  ,42368  },
{1608   ,2088   ,2600   ,3368   ,4136   ,5160   ,5992   ,6968   ,7992   ,9144   ,10296  ,11832  ,12960  ,14688  ,16416  ,17568  ,19080  ,20616  ,22920  ,25456  ,27376  ,29296  ,31704  ,32856  ,35160  ,36696  ,42368  },
{1608   ,2152   ,2664   ,3496   ,4264   ,5160   ,6200   ,7224   ,8248   ,9144   ,10296  ,11832  ,13536  ,15264  ,16992  ,18336  ,19080  ,21384  ,23688  ,25456  ,27376  ,29296  ,31704  ,34008  ,36696  ,37888  ,43816  },
{1672   ,2152   ,2664   ,3496   ,4264   ,5352   ,6200   ,7224   ,8504   ,9528   ,10680  ,12216  ,13536  ,15264  ,16992  ,18336  ,19848  ,21384  ,23688  ,25456  ,28336  ,30576  ,32856  ,34008  ,36696  ,37888  ,43816  },
{1672   ,2216   ,2728   ,3624   ,4392   ,5352   ,6456   ,7480   ,8504   ,9528   ,10680  ,12216  ,14112  ,15840  ,17568  ,18336  ,19848  ,22152  ,24496  ,26416  ,28336  ,30576  ,32856  ,35160  ,36696  ,39232  ,45352  },
{1736   ,2280   ,2792   ,3624   ,4392   ,5544   ,6456   ,7480   ,8760   ,9912   ,11064  ,12576  ,14112  ,15840  ,17568  ,19080  ,19848  ,22152  ,24496  ,26416  ,29296  ,31704  ,34008  ,35160  ,37888  ,39232  ,45352  },
{1736   ,2280   ,2856   ,3624   ,4584   ,5544   ,6456   ,7736   ,8760   ,9912   ,11064  ,12576  ,14112  ,16416  ,18336  ,19080  ,20616  ,22920  ,24496  ,27376  ,29296  ,31704  ,34008  ,36696  ,37888  ,40576  ,46888  },
{1800   ,2344   ,2856   ,3752   ,4584   ,5736   ,6712   ,7736   ,9144   ,10296  ,11448  ,12960  ,14688  ,16416  ,18336  ,19848  ,20616  ,22920  ,25456  ,27376  ,29296  ,31704  ,34008  ,36696  ,39232  ,40576  ,46888  },
{1800   ,2344   ,2856   ,3752   ,4584   ,5736   ,6712   ,7992   ,9144   ,10296  ,11448  ,12960  ,14688  ,16992  ,18336  ,19848  ,21384  ,23688  ,25456  ,28336  ,30576  ,32856  ,35160  ,37888  ,39232  ,40576  ,48936  },
{1800   ,2408   ,2984   ,3880   ,4776   ,5736   ,6968   ,7992   ,9144   ,10296  ,11448  ,13536  ,15264  ,16992  ,19080  ,20616  ,21384  ,23688  ,26416  ,28336  ,30576  ,32856  ,35160  ,37888  ,40576  ,42368  ,48936  },
{1864   ,2472   ,2984   ,3880   ,4776   ,5992   ,6968   ,8248   ,9528   ,10680  ,11832  ,13536  ,15264  ,16992  ,19080  ,20616  ,22152  ,24496  ,26416  ,29296  ,31704  ,34008  ,36696  ,37888  ,40576  ,42368  ,48936  },
{1864   ,2472   ,3112   ,4008   ,4968   ,5992   ,6968   ,8248   ,9528   ,10680  ,11832  ,13536  ,15264  ,17568  ,19848  ,20616  ,22152  ,24496  ,27376  ,29296  ,31704  ,34008  ,36696  ,39232  ,42368  ,43816  ,51024  },
{1928   ,2536   ,3112   ,4008   ,4968   ,5992   ,7224   ,8504   ,9528   ,11064  ,12216  ,14112  ,15840  ,17568  ,19848  ,21384  ,22152  ,24496  ,27376  ,29296  ,31704  ,35160  ,36696  ,39232  ,42368  ,43816  ,51024  },
{1928   ,2536   ,3112   ,4136   ,4968   ,6200   ,7224   ,8504   ,9912   ,11064  ,12216  ,14112  ,15840  ,18336  ,19848  ,21384  ,22920  ,25456  ,27376  ,30576  ,32856  ,35160  ,37888  ,40576  ,42368  ,43816  ,52752  },
{1992   ,2600   ,3240   ,4136   ,5160   ,6200   ,7480   ,8760   ,9912   ,11064  ,12576  ,14112  ,16416  ,18336  ,20616  ,22152  ,22920  ,25456  ,28336  ,30576  ,32856  ,35160  ,37888  ,40576  ,43816  ,45352  ,52752  },
{1992   ,2600   ,3240   ,4264   ,5160   ,6200   ,7480   ,8760   ,9912   ,11448  ,12576  ,14688  ,16416  ,18336  ,20616  ,22152  ,23688  ,26416  ,28336  ,30576  ,34008  ,36696  ,39232  ,40576  ,43816  ,45352  ,52752  },
{2024   ,2664   ,3240   ,4264   ,5160   ,6456   ,7736   ,8760   ,10296  ,11448  ,12960  ,14688  ,16416  ,19080  ,20616  ,22152  ,23688  ,26416  ,29296  ,31704  ,34008  ,36696  ,39232  ,42368  ,45352  ,46888  ,55056  },
{2088   ,2728   ,3368   ,4392   ,5352   ,6456   ,7736   ,9144   ,10296  ,11832  ,12960  ,14688  ,16992  ,19080  ,21384  ,22920  ,24496  ,26416  ,29296  ,31704  ,34008  ,36696  ,40576  ,42368  ,45352  ,46888  ,55056  },
{2088   ,2728   ,3368   ,4392   ,5352   ,6712   ,7736   ,9144   ,10680  ,11832  ,12960  ,15264  ,16992  ,19080  ,21384  ,22920  ,24496  ,27376  ,29296  ,32856  ,35160  ,37888  ,40576  ,43816  ,45352  ,46888  ,55056  },
{2088   ,2792   ,3368   ,4392   ,5544   ,6712   ,7992   ,9144   ,10680  ,11832  ,13536  ,15264  ,17568  ,19848  ,22152  ,23688  ,24496  ,27376  ,30576  ,32856  ,35160  ,37888  ,40576  ,43816  ,46888  ,48936  ,55056  },
{2152   ,2792   ,3496   ,4584   ,5544   ,6712   ,7992   ,9528   ,10680  ,12216  ,13536  ,15840  ,17568  ,19848  ,22152  ,23688  ,25456  ,27376  ,30576  ,32856  ,35160  ,39232  ,42368  ,43816  ,46888  ,48936  ,57336  },
{2152   ,2856   ,3496   ,4584   ,5544   ,6968   ,8248   ,9528   ,11064  ,12216  ,13536  ,15840  ,17568  ,19848  ,22152  ,23688  ,25456  ,28336  ,30576  ,34008  ,36696  ,39232  ,42368  ,45352  ,46888  ,48936  ,57336  },
{2216   ,2856   ,3496   ,4584   ,5736   ,6968   ,8248   ,9528   ,11064  ,12576  ,14112  ,15840  ,18336  ,20616  ,22920  ,24496  ,25456  ,28336  ,31704  ,34008  ,36696  ,39232  ,42368  ,45352  ,48936  ,51024  ,57336  },
{2216   ,2856   ,3624   ,4776   ,5736   ,6968   ,8248   ,9912   ,11064  ,12576  ,14112  ,16416  ,18336  ,20616  ,22920  ,24496  ,26416  ,29296  ,31704  ,34008  ,36696  ,40576  ,43816  ,45352  ,48936  ,51024  ,59256  },
{2280   ,2984   ,3624   ,4776   ,5736   ,7224   ,8504   ,9912   ,11448  ,12960  ,14112  ,16416  ,18336  ,20616  ,22920  ,24496  ,26416  ,29296  ,31704  ,35160  ,37888  ,40576  ,43816  ,46888  ,48936  ,51024  ,59256  },
{2280   ,2984   ,3624   ,4776   ,5992   ,7224   ,8504   ,9912   ,11448  ,12960  ,14688  ,16416  ,19080  ,21384  ,23688  ,25456  ,26416  ,29296  ,32856  ,35160  ,37888  ,40576  ,43816  ,46888  ,51024  ,52752  ,59256  },
{2280   ,2984   ,3752   ,4776   ,5992   ,7224   ,8760   ,10296  ,11448  ,12960  ,14688  ,16992  ,19080  ,21384  ,23688  ,25456  ,27376  ,30576  ,32856  ,35160  ,39232  ,42368  ,45352  ,46888  ,51024  ,52752  ,61664  },
{2344   ,3112   ,3752   ,4968   ,5992   ,7480   ,8760   ,10296  ,11832  ,13536  ,14688  ,16992  ,19080  ,21384  ,24496  ,25456  ,27376  ,30576  ,32856  ,36696  ,39232  ,42368  ,45352  ,48936  ,51024  ,52752  ,61664  },
{2344   ,3112   ,3880   ,4968   ,5992   ,7480   ,8760   ,10296  ,11832  ,13536  ,14688  ,16992  ,19080  ,22152  ,24496  ,26416  ,27376  ,30576  ,34008  ,36696  ,39232  ,42368  ,45352  ,48936  ,52752  ,55056  ,61664  },
{2408   ,3112   ,3880   ,4968   ,6200   ,7480   ,9144   ,10680  ,12216  ,13536  ,15264  ,17568  ,19848  ,22152  ,24496  ,26416  ,28336  ,30576  ,34008  ,36696  ,40576  ,43816  ,46888  ,48936  ,52752  ,55056  ,63776  },
{2408   ,3240   ,3880   ,5160   ,6200   ,7736   ,9144   ,10680  ,12216  ,13536  ,15264  ,17568  ,19848  ,22152  ,25456  ,26416  ,28336  ,31704  ,34008  ,37888  ,40576  ,43816  ,46888  ,51024  ,52752  ,55056  ,63776  },
{2472   ,3240   ,4008   ,5160   ,6200   ,7736   ,9144   ,10680  ,12216  ,14112  ,15264  ,17568  ,19848  ,22920  ,25456  ,27376  ,28336  ,31704  ,35160  ,37888  ,40576  ,43816  ,46888  ,51024  ,52752  ,55056  ,63776  },
{2472   ,3240   ,4008   ,5160   ,6456   ,7736   ,9144   ,11064  ,12576  ,14112  ,15840  ,18336  ,20616  ,22920  ,25456  ,27376  ,29296  ,31704  ,35160  ,37888  ,42368  ,45352  ,48936  ,51024  ,55056  ,57336  ,66592  },
{2536   ,3240   ,4008   ,5352   ,6456   ,7992   ,9528   ,11064  ,12576  ,14112  ,15840  ,18336  ,20616  ,22920  ,25456  ,27376  ,29296  ,32856  ,35160  ,39232  ,42368  ,45352  ,48936  ,51024  ,55056  ,57336  ,66592  },
{2536   ,3368   ,4136   ,5352   ,6456   ,7992   ,9528   ,11064  ,12576  ,14112  ,15840  ,18336  ,20616  ,23688  ,26416  ,28336  ,29296  ,32856  ,36696  ,39232  ,42368  ,45352  ,48936  ,52752  ,55056  ,57336  ,66592  },
{2536   ,3368   ,4136   ,5352   ,6456   ,7992   ,9528   ,11448  ,12960  ,14688  ,16416  ,18336  ,21384  ,23688  ,26416  ,28336  ,30576  ,32856  ,36696  ,39232  ,42368  ,46888  ,48936  ,52752  ,57336  ,59256  ,68808  },
{2600   ,3368   ,4136   ,5352   ,6712   ,8248   ,9528   ,11448  ,12960  ,14688  ,16416  ,19080  ,21384  ,23688  ,26416  ,28336  ,30576  ,34008  ,36696  ,40576  ,43816  ,46888  ,51024  ,52752  ,57336  ,59256  ,68808  },
{2600   ,3496   ,4264   ,5544   ,6712   ,8248   ,9912   ,11448  ,12960  ,14688  ,16416  ,19080  ,21384  ,24496  ,27376  ,29296  ,30576  ,34008  ,37888  ,40576  ,43816  ,46888  ,51024  ,55056  ,57336  ,59256  ,68808  },
{2664   ,3496   ,4264   ,5544   ,6712   ,8248   ,9912   ,11448  ,13536  ,15264  ,16992  ,19080  ,21384  ,24496  ,27376  ,29296  ,30576  ,34008  ,37888  ,40576  ,43816  ,46888  ,51024  ,55056  ,57336  ,61664  ,71112  },
{2664   ,3496   ,4264   ,5544   ,6968   ,8504   ,9912   ,11832  ,13536  ,15264  ,16992  ,19080  ,22152  ,24496  ,27376  ,29296  ,31704  ,35160  ,37888  ,40576  ,45352  ,48936  ,51024  ,55056  ,59256  ,61664  ,71112  },
{2728   ,3496   ,4392   ,5736   ,6968   ,8504   ,10296  ,11832  ,13536  ,15264  ,16992  ,19848  ,22152  ,25456  ,28336  ,29296  ,31704  ,35160  ,37888  ,42368  ,45352  ,48936  ,52752  ,55056  ,59256  ,61664  ,71112  },
{2728   ,3624   ,4392   ,5736   ,6968   ,8760   ,10296  ,11832  ,13536  ,15264  ,16992  ,19848  ,22152  ,25456  ,28336  ,30576  ,31704  ,35160  ,39232  ,42368  ,45352  ,48936  ,52752  ,57336  ,59256  ,61664  ,73712  },
{2728   ,3624   ,4392   ,5736   ,6968   ,8760   ,10296  ,12216  ,14112  ,15840  ,17568  ,19848  ,22920  ,25456  ,28336  ,30576  ,31704  ,35160  ,39232  ,42368  ,46888  ,48936  ,52752  ,57336  ,61664  ,63776  ,73712  },
{2792   ,3624   ,4584   ,5736   ,7224   ,8760   ,10296  ,12216  ,14112  ,15840  ,17568  ,19848  ,22920  ,25456  ,28336  ,30576  ,32856  ,36696  ,39232  ,43816  ,46888  ,51024  ,55056  ,57336  ,61664  ,63776  ,75376  },
{2792   ,3752   ,4584   ,5992   ,7224   ,8760   ,10680  ,12216  ,14112  ,15840  ,17568  ,20616  ,22920  ,26416  ,29296  ,30576  ,32856  ,36696  ,40576  ,43816  ,46888  ,51024  ,55056  ,57336  ,61664  ,63776  ,75376  },
{2856   ,3752   ,4584   ,5992   ,7224   ,9144   ,10680  ,12576  ,14112  ,16416  ,18336  ,20616  ,23688  ,26416  ,29296  ,31704  ,32856  ,36696  ,40576  ,43816  ,46888  ,51024  ,55056  ,59256  ,61664  ,63776  ,75376  },
{2856   ,3752   ,4584   ,5992   ,7480   ,9144   ,10680  ,12576  ,14688  ,16416  ,18336  ,20616  ,23688  ,26416  ,29296  ,31704  ,34008  ,36696  ,40576  ,43816  ,48936  ,51024  ,55056  ,59256  ,63776  ,66592  ,75376  },
{2856   ,3752   ,4584   ,5992   ,7480   ,9144   ,10680  ,12576  ,14688  ,16416  ,18336  ,21384  ,23688  ,26416  ,29296  ,31704  ,34008  ,37888  ,40576  ,45352  ,48936  ,52752  ,57336  ,59256  ,63776  ,66592  ,75376  },
{2984   ,3880   ,4776   ,6200   ,7480   ,9144   ,11064  ,12960  ,14688  ,16416  ,18336  ,21384  ,23688  ,27376  ,30576  ,31704  ,34008  ,37888  ,42368  ,45352  ,48936  ,52752  ,57336  ,59256  ,63776  ,66592  ,75376  },
{2984   ,3880   ,4776   ,6200   ,7480   ,9528   ,11064  ,12960  ,14688  ,16992  ,18336  ,21384  ,24496  ,27376  ,30576  ,32856  ,34008  ,37888  ,42368  ,45352  ,48936  ,52752  ,57336  ,61664  ,63776  ,66592  ,75376  },
{2984   ,3880   ,4776   ,6200   ,7736   ,9528   ,11064  ,12960  ,15264  ,16992  ,19080  ,21384  ,24496  ,27376  ,30576  ,32856  ,35160  ,39232  ,42368  ,46888  ,48936  ,52752  ,57336  ,61664  ,66592  ,68808  ,75376  },
{2984   ,4008   ,4776   ,6200   ,7736   ,9528   ,11448  ,12960  ,15264  ,16992  ,19080  ,22152  ,24496  ,27376  ,30576  ,32856  ,35160  ,39232  ,42368  ,46888  ,51024  ,55056  ,59256  ,61664  ,66592  ,68808  ,75376  },
{2984   ,4008   ,4968   ,6456   ,7736   ,9528   ,11448  ,13536  ,15264  ,16992  ,19080  ,22152  ,24496  ,28336  ,31704  ,34008  ,35160  ,39232  ,43816  ,46888  ,51024  ,55056  ,59256  ,61664  ,66592  ,68808  ,75376  },
{3112   ,4008   ,4968   ,6456   ,7992   ,9528   ,11448  ,13536  ,15264  ,17568  ,19080  ,22152  ,25456  ,28336  ,31704  ,34008  ,35160  ,39232  ,43816  ,46888  ,51024  ,55056  ,59256  ,63776  ,66592  ,71112  ,75376  }
};

  group PDCP_SDU {

  template (value) PDCP_SDU_Type crs_PDCP_SDU_12B   := f_GetN_OctetsFromPRBS(100,12);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_12B1   := f_GetN_OctetsFromPRBS(200,12);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_13B   := f_GetN_OctetsFromPRBS(100,13);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_4B    := f_GetN_OctetsFromPRBS(120,4);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_6B    := f_GetN_OctetsFromPRBS(40,6);     /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_5B    := f_GetN_OctetsFromPRBS(40,5);     /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_7B    := f_GetN_OctetsFromPRBS(40,7);     /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_9B    := f_GetN_OctetsFromPRBS(40,9);     /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_1B    := f_GetN_OctetsFromPRBS(1250,1);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_2B    := f_GetN_OctetsFromPRBS(1250,2);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_10B   := f_GetN_OctetsFromPRBS(0,10);     /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B1  := f_GetN_OctetsFromPRBS(10,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B2  := f_GetN_OctetsFromPRBS(20,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B3  := f_GetN_OctetsFromPRBS(30,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B4  := f_GetN_OctetsFromPRBS(40,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B5  := f_GetN_OctetsFromPRBS(50,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B6  := f_GetN_OctetsFromPRBS(60,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B7  := f_GetN_OctetsFromPRBS(70,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B8  := f_GetN_OctetsFromPRBS(80,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_16B9  := f_GetN_OctetsFromPRBS(90,16);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_19B   := f_GetN_OctetsFromPRBS(0,19);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_29B   := f_GetN_OctetsFromPRBS(0,29);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_21B   := f_GetN_OctetsFromPRBS(0,21);     /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_19B1  := f_GetN_OctetsFromPRBS(20,19);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_40B   := f_GetN_OctetsFromPRBS(20,40);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_36B   := f_GetN_OctetsFromPRBS(20,36);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_320B  := f_GetN_OctetsFromPRBS(20,320);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_124B  := f_GetN_OctetsFromPRBS(0,124);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_Padding_5Bytes := f_GetN_OctetsFromPRBS(1000,5);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_Padding_1Bytes := f_GetN_OctetsFromPRBS(1000,1);
  template (value) PDCP_SDU_Type crs_Padding_3Bytes := f_GetN_OctetsFromPRBS(1000,3);
  template (value) PDCP_SDU_Type crs_Padding_2Bytes := f_GetN_OctetsFromPRBS(1000,2);
  template (value) PDCP_SDU_Type crs_Padding_4Bytes := f_GetN_OctetsFromPRBS(1000,4);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_Padding_7Bytes := f_GetN_OctetsFromPRBS(1000,7);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L37   := f_GetN_OctetsFromPRBS(500,37);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L38   := f_GetN_OctetsFromPRBS(550,38);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L38_1 := f_GetN_OctetsFromPRBS(750,38);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L39   := f_GetN_OctetsFromPRBS(200,39);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L39_1 := f_GetN_OctetsFromPRBS(500,39);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L40   := f_GetN_OctetsFromPRBS(300,40);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L41   := f_GetN_OctetsFromPRBS(300,41);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L42   := f_GetN_OctetsFromPRBS(300,42);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L50   := f_GetN_OctetsFromPRBS(300,50);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L128  := f_GetN_OctetsFromPRBS(0,128);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L125  := f_GetN_OctetsFromPRBS(600,125);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L126  := f_GetN_OctetsFromPRBS(100,126);  /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L123  := f_GetN_OctetsFromPRBS(750,123);  /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L3    := f_GetN_OctetsFromPRBS(100,3);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L6    := f_GetN_OctetsFromPRBS(500,6);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L8    := f_GetN_OctetsFromPRBS(200,8);    /* @status    APPROVED */
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L9    := f_GetN_OctetsFromPRBS(210,9);
  template (value) PDCP_SDU_Type crs_PDCP_SDU_L10   := f_GetN_OctetsFromPRBS(220,10);   /* @status    APPROVED */
  template (value) PDCP_SDU_Type cs_PDCP_SDU_L318   := f_GetN_OctetsFromPRBS(1200,318); /* @status    APPROVED */

  template octetstring cr_Octet5_Any   := ? length(5);    /* @status    APPROVED */
  template octetstring cr_Octet7_Any   := ? length(7);    /* @status    APPROVED */
  template octetstring cr_Octet6_Any   := ? length(6);    /* @status    APPROVED */
  template octetstring cr_Octet9_Any   := ? length(9);
  template octetstring cr_Octet12_Any  := ? length(12);   /* @status    APPROVED */
  template octetstring cr_Octet24_Any  := ? length(24);   /* @status    APPROVED */
  template octetstring cr_Octet4_Any   := ? length(4);    /* @status    APPROVED */
                                                          //@sic R5s100466 sic@
  template octetstring cr_Octet1_Any   := ? length(1);    /* @status    APPROVED */
  template octetstring cr_Octet3_Any   := ? length(3);    /* @status    APPROVED */
  template octetstring cr_Octet2_Any   := ? length(2);    /* @status    APPROVED */
  template octetstring cr_Octet8_Any   := ? length(8);
  template octetstring cr_Octet10_Any  := ? length(10);   /* @status    APPROVED */
  template octetstring cr_Octet13_Any  := ? length(13);   /* @status    APPROVED */
  template octetstring cr_Octet15_Any  := ? length(15);
  template octetstring cr_Octet14_Any  := ? length(14);   /* @status    APPROVED */
  template octetstring cr_Octet11_Any  := ? length(11);
  template octetstring cr_Octet127_Any := ? length(127);
  template octetstring cr_Octet153_Any := ? length(153);
  template octetstring cr_Octet40_Any  := ? length(40);
  template bitstring   cr_Bit1_Any     := ? length(1);
  template B6_Type     cr_BS_Any       := ? length(6);    /* @status    APPROVED */

  } // end of group PDCP_SDU

  group IE_Templates {

  template (value) L1Mac_IndicationControl_Type cs_EnableC_RNTI_Req(L1Mac_IndicationMode_Type p_C_RNTI) :=
  { /* @status    APPROVED */
    RachPreamble := omit,
    SchedReq  := omit,
    BSR       := omit,
    UL_HARQ   := omit,
    C_RNTI    := p_C_RNTI,  /* To enable/disable reporting of C-RNTI MAC header received. */
    PHR       := omit,
    HarqError := omit
  };

//template DRB_DataPerSubframeList_DL_Type cs_NullDataPerSubframeList := {};
  //////////////////////////////////////////////////////////////////////////////
  // Templates for RACH Response Config
  //////////////////////////////////////////////////////////////////////////////
  template (value) ContentionResolutionCtrl_Type cs_ContReslCtrl_None_TCRNTI_MacPdu(template (value) octetstring p_RLC_PDU) :=
  { /* results in no Contention resolution for T-CRNTI  but includes a Mac Pdu */
    /* @status    APPROVED */
    TCRNTI_Based := {
      MacPdu := {
        ContainedId := {None := true},            //SS shall not include contention resolution ID
        ContainedRlcPdu := {RlcPdu := p_RLC_PDU}  //JKS NOTE: used in step 5 of 7.1.2.7
      }
    }
  };
  template (value) ContentionResolutionCtrl_Type cs_ContReslCtrl_Fail_TCRNTI :=
  { /* results in no Contention resolution for T-CRNTI */
    /* @status    APPROVED */
    TCRNTI_Based := {
      MacPdu := {
        ContainedId := {XorMask := tsc_ContentionResolutionId_Unmatch},
        ContainedRlcPdu := {None := true}
      }
    }
  };


  // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
  template (value) RandomAccessResponseConfig_Type cs_RandomAccessResponseConfig_CRC_Error( Dl_Bandwidth_Type p_Dl_Bandwidth):=
  { // will cause CRC error on UE side
    /* @status    APPROVED */
    Ctrl_CRC_Error  := {
      DciInfo := cs_DciInfo_RandomAccessResponse( p_Dl_Bandwidth),
      Rar := {
        List := {
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_Auto, cs_TempC_RNTI_SameAsC_RNTI)
        }
      },
      BackoffInd := cs_BI_None
    }
  };

  template (value) RandomAccessResponseConfig_Type cs_RandomAccessResponseConfig_MultiRAR_UnMatched ( Dl_Bandwidth_Type p_Dl_Bandwidth):=
  { /* 5 RARS included all with unmatching RAPID */
    /* @status    APPROVED */
    Ctrl  := {
      DciInfo := cs_DciInfo_RandomAccessResponse( p_Dl_Bandwidth),
      Rar := {
        List := {
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched, cs_TempC_RNTI_Explicit ('1001000000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched, cs_TempC_RNTI_Explicit ('1101000000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched, cs_TempC_RNTI_Explicit ('1011000000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched, cs_TempC_RNTI_Explicit ('1001100000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched, cs_TempC_RNTI_Explicit ('1001010000110100'B))
          // C-RNTI's arbitrarily selected to be not equal to configured and different from each other
        }
      },
      BackoffInd := cs_BI_None
    }
  };
   // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
  template (value) RandomAccessResponseConfig_Type cs_RandomAccessResponseConfig_MultiRAR_1Matched ( Dl_Bandwidth_Type p_Dl_Bandwidth):=
  { /* 5 RARS included all with unmatching RAPID except 4th with a matching RAPID */
    /* @status    APPROVED */
    Ctrl  := {
      DciInfo      := cs_DciInfo_RandomAccessResponse( p_Dl_Bandwidth),
      Rar          := {
        List := {
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched,cs_TempC_RNTI_Explicit ('1001000000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched,cs_TempC_RNTI_Explicit ('1101000000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_Auto,cs_TempC_RNTI_SameAsC_RNTI),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched,cs_TempC_RNTI_Explicit ('1001100000110100'B)),
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched,cs_TempC_RNTI_Explicit ('1001010000110100'B))
          // C-RNTI's arbitrarily selected to be not equal to configured and different from each other
        }
      },
      BackoffInd   := cs_BI_None
    }
  };


  template (value) RapIdCtrl_Type cs_RapIdCtrl_UnMatched :=
  { /* @status    APPROVED */
    Unmatched := true   /* SS shall use RAPID being different from preamble sent by the UE;
                           SS shall calculate this RAPID acc. to RAPID := (RAPID + 3) mod 64 */
  };

  template (value) TempC_RNTI_Type cs_TempC_RNTI_Explicit(C_RNTI p_C_RNTI):=
  { /* @status    APPROVED */
    Explicit  := p_C_RNTI
  };

  template (value) RandomAccessBackoffIndicator_Type cs_BI_Index(integer p_Index) :=
  { /* @status    APPROVED */
    Index  := p_Index
  };

  template (value) RandomAccessResponseParameters_Type cs_RandomAccessResponseParameters_Def (template (value) RapIdCtrl_Type p_Rapid,
                                                                                              template (value) TempC_RNTI_Type p_TempC_RNTI_Type,
                                                                                              RACH_TimingAdvance_Type    p_RAR_TA := 0) :=
  { /* paramenters to control content of RAR sent to the UE */
    /* @status    APPROVED */
    RapId := p_Rapid,          /* to control Random Access Preamble Id to be sent back to the UE; used in RAR MAC sub-header */
    InitialGrant := cs_InitialGrant_Def, //@sic R5s100073
    TimingAdvance := p_RAR_TA,
    TempC_RNTI := p_TempC_RNTI_Type
  };

    // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
    template (value) RandomAccessResponseConfig_Type cs_RandomAccessResponseConfig_DiffRAPID_Def(
                                        template (value) RandomAccessBackoffIndicator_Type p_BI := cs_BI_None,
                                         Dl_Bandwidth_Type p_Dl_Bandwidth) :=
  { /* @status    APPROVED */
    Ctrl := {
      DciInfo := cs_DciInfo_RandomAccessResponse (  p_Dl_Bandwidth),
      Rar := {
        List := {
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_UnMatched, cs_TempC_RNTI_SameAsC_RNTI)
        }
      },
      BackoffInd := p_BI
    }
  };

    // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
    template (value) RandomAccessResponseConfig_Type cs_RandomAccessResponseConfig_MatchRAPID_BI(integer p_BI,
                                                                                               Dl_Bandwidth_Type p_Dl_Bandwidth) :=
  { /* @status    APPROVED */
    Ctrl := {
      DciInfo := cs_DciInfo_RandomAccessResponse( p_Dl_Bandwidth),
      Rar := {
        List := {
          cs_RandomAccessResponseParameters_Def(cs_RapIdCtrl_Auto, cs_TempC_RNTI_SameAsC_RNTI)
        }
      },
      BackoffInd := {
        Index  := p_BI
      }
    }
  };


  // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_CRNTI_7_1_2_2_1(RACH_TimingAdvance_Type p_RAR_TA,
                                                                                   Dl_Bandwidth_Type p_Dl_Bandwidth) :=
  { /* @status    APPROVED */
    RACH_ConfigCommon := omit, // not change from initial value
    RACH_ConfigDedicated := cs_RACH_ConfigDedicated_r8(cs_RACH_ConfigDedicated),
    RachProcedureList := {
      {
        RAResponse := cs_RandomAccessResponseConfig_None(p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None // as dedicated resource indicated hence no PDCCH address for UE needed.
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_None(p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None // as dedicated resource indicated hence no PDCCH address for UE needed.
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_None(p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None // as dedicated resource indicated hence no PDCCH address for UE needed.
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA, p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None // as dedicated resource indicated hence no PDCCH address for UE needed.
      }
    }
  };

  // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7123 (RACH_TimingAdvance_Type p_RAR_TA,
                                                                          Dl_Bandwidth_Type p_Dl_Bandwidth):=
  { /* Rach Response config for test case 7.1.2.3 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception 1. No RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_None (p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 2. No RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_None(p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 3.  RAR Tx succesful but no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 4 and all rest. No RAR Tx & no Contention Resolution
      // This means wrap around should not be specified.
      {
        RAResponse := cs_RandomAccessResponseConfig_None(p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      }
    }
  };


  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_Dedicated_7123( integer p_RB_Allocation,
                                                                                   integer p_MCS,
                                                                                   RACH_TimingAdvance_Type p_RAR_TA,
                                                                                   Dl_Bandwidth_Type p_Dl_Bandwidth) :=// @sic R5-103846
  { /* Rach Response config for test case 7.1.2.3 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := cs_RACH_ConfigDedicated_r8(cs_RACH_ConfigDedicated),
    RachProcedureList := {
      // preamble reception 1. No RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_None ( p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None // as dedicated resource indicated hence no PDCCH address for UE needed.
      },
      // preamble reception 2. No RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_None( p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None // as dedicated resource indicated hence no PDCCH address for UE needed.
      },
      // preamble reception 3.  RAR Tx succesful but no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA, p_Dl_Bandwidth, p_RB_Allocation, p_MCS),  // @sic R5-103846, R5s090349, R5s100430 sic@
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None //  no PDCCH address for UE transmitted.
      },
      // preamble reception 3.  RAR Tx succesful and  Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA, p_Dl_Bandwidth, p_RB_Allocation, p_MCS),// @sic R5s090349, R5s100430 sic@
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI //  PDCCH address for UE transmitted.
      }
    }
  };

  // @sic R5-103846: adding Dl_Bandwidth and sysinfo combination parameters sic@
  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7124_1 (template (value) octetstring p_RLC_PDU,
                                                                           RACH_TimingAdvance_Type      p_RAR_TA,
                                                                           Dl_Bandwidth_Type p_Dl_Bandwidth):=
  { /* Rach Response config for test case 7.1.2.4 steps 2 to 11 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception 1. No RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_None( p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 2. No RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_None( p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 3.  RAR Tx unsuccesful[not matching RAPID]  no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_DiffRAPID_Def(cs_BI_None,p_Dl_Bandwidth),   // WORKAROUND: cs_BI_None needs to be removed
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 4  RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 5 and all rest. RAR Tx &  Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Def(p_RLC_PDU)
      }
    }
  };

  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7125( Dl_Bandwidth_Type p_Dl_Bandwidth) :=// @sic R5-103846 sic@
  { /* Rach Response config for test case 7.1.2.5 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception 1. Multiple RARs but none matching with UE RAPID
      {
        RAResponse := cs_RandomAccessResponseConfig_MultiRAR_UnMatched(p_Dl_Bandwidth),// @sic R5-103846 sic@
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 2. Multiple RARs and last matching with UE RAPID
      {
        RAResponse := cs_RandomAccessResponseConfig_MultiRAR_1Matched (p_Dl_Bandwidth),// @sic R5-103846 sic@
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_Def
      }
    }
  };

  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7129_1(integer p_BI,
                                                                          template (value) octetstring p_RLC_PDU,
                                                                          RACH_TimingAdvance_Type    p_RAR_TA,
                                                                           Dl_Bandwidth_Type p_Dl_Bandwidth  // @sic R5-103846 sic@
                                                                           ) :=
  { /* Rach Response config for test case 7.1.2.9-1 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception tx RAR with un matching RAPID and no contention resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_DiffRAPID_Def(cs_BI_Index(p_BI),p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception do not tx RAR  and no contention resolution
      // @sic R5-096401 sic@
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Def(p_RLC_PDU)
      }
    }
  };

  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7129_2 (integer p_BI,
                                                                           template (value) octetstring p_RLC_PDU,
                                                                           RACH_TimingAdvance_Type    p_RAR_TA,
                                                                            Dl_Bandwidth_Type p_Dl_Bandwidth  // @sic R5-103846 sic@
                                                                            ):=
  { /* Rach Response config for test case 7.1.2.9-2 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception tx RAR with un matching RAPID and no contention resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_MatchRAPID_BI(p_BI,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_Fail_TCRNTI
      },
      // preamble reception do not tx RAR  and no contention resolution
      // @sic R5-096401 sic@
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Def(p_RLC_PDU)
      }
    }
  };

  template (value) ContentionResolutionCtrl_Type cs_ContentionResolutionCtrl_ContRLCPDU_Def(template (value) octetstring p_RLC_PDU) :=
  { /* @status    APPROVED */
    TCRNTI_Based := {
      MacPdu := {
        ContainedId := {XorMask := tsc_ContentionResolutionId_Unchanged},
        ContainedRlcPdu := {RlcPdu := p_RLC_PDU}
      }
    }
  };

  template (value) ContentionResolutionCtrl_Type cs_ContentionResolutionCtrl_ContRLCPDU_Fail(template (value) octetstring p_RLC_PDU) :=
  { /* @status    APPROVED */
    TCRNTI_Based := {
      MacPdu := {
        ContainedId := {XorMask := tsc_ContentionResolutionId_Unmatch},
        ContainedRlcPdu := {RlcPdu := p_RLC_PDU}
      }
    }
  };

  template (value) ContentionResolutionCtrl_Type cs_ContentionResolutionCtrl_ContRLCPDU_CRC_Error(template (value) octetstring p_RLC_PDU) :=
  { /* @status    APPROVED */
    TCRNTI_Based := {
      MacPdu_CRC_Error := {
        ContainedId := {XorMask := tsc_ContentionResolutionId_Unchanged},
        ContainedRlcPdu := {RlcPdu := p_RLC_PDU}
      }
    }
  };

  template (value) RachProcedureConfig_Type cs_RachProcConfig_ContainedRRCConSet_Def(template (value) octetstring p_RLC_PDU,
                                                                                     RACH_TimingAdvance_Type    p_RAR_TA,
                                                                                     Dl_Bandwidth_Type p_Dl_Bandwidth  // @sic R5-103846 sic@
                                                                                      ) :=
  { // Rach Response config for steps which need to send embedded RRC Connection setup message
    // in the MAC PDU carrying MAC contention resolution
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception 1. succesful RAR Tx & no Contention Resolution
      // TBD  Requirement to send the RAR in a Sub Frame 4.
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        // By default UL Delay bit is set as '0'
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 2.  RAR Tx & Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl :=  cs_ContentionResolutionCtrl_ContRLCPDU_Def(p_RLC_PDU)
      }
    }
  };

  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7127 (template (value) octetstring p_RLC_PDU,
                                                                         RACH_TimingAdvance_Type    p_RAR_TA,
                                                                         Dl_Bandwidth_Type p_Dl_Bandwidth  // @sic R5-103846 sic@
                                                                          ):=
  { /* Rach Response config for test case 7.1.2.7 */
    /* @status    APPROVED */
    RACH_ConfigCommon := omit,
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      // preamble reception 1. succesful RAR Tx & no Contention Resolution
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      // preamble reception 2. succesful  RAR Tx & no Contention Resolution, includes a Mac PDU
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI_MacPdu(p_RLC_PDU)
        // Test case wants no Cont header and RRC PDU transmitted, but present ASP does not allo this.
        // So SS is configured for no contention resolution and RRC PDU to be transmitted from TTCN. This should take
        // no more than 64 ms to achieve the test purpose. IF it cannot be guaranteed then ASP need a change.
        // JKS NOTE:this is done comments to be removed
      },
      // preamble reception 3.  succesful  Tx succesful, Contention Resolution fails,includes a Mac PDU
      {
        RAResponse := cs_RandomAccessResponseConfig_Def(p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Fail(p_RLC_PDU)
      },
      // preamble reception 4 and all rest. succesful RAR Tx & Contention Resolution ok,includes a Mac PDU
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Def(p_RLC_PDU)
      }
    }
  };
  
  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_CRNTI_7_1_2_8(RACH_TimingAdvance_Type p_RAR_TA,
                                                                                 Dl_Bandwidth_Type p_Dl_Bandwidth  // @sic R5-103846 sic@
                                                                                 ) :=
  {
    RACH_ConfigCommon := omit, // not change from initial value
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI_None
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContReslCtrl_CRNTI
      }
    }
  };

  template (value) RachProcedureConfig_Type cs_RachProcedureConfig_7135 (template (value) octetstring p_RLC_PDU,
                                                                         RACH_TimingAdvance_Type p_RAR_TA,
                                                                         Dl_Bandwidth_Type p_Dl_Bandwidth  // @sic R5-103846 sic@
                                                                         ) :=
  { /* @status    APPROVED */
    RACH_ConfigCommon := omit, // not change feom initial value
    RACH_ConfigDedicated := omit,
    RachProcedureList := {
      {
        RAResponse := cs_RandomAccessResponseConfig_CRC_Error(p_Dl_Bandwidth), // step 3 CRC error// @sic R5-103846 sic@
        ContentionResolutionCtrl := cs_ContReslCtrl_None_TCRNTI
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Fail(p_RLC_PDU) // Step 9 not matching ContResolution ID
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_CRC_Error(p_RLC_PDU) // Step 19 CRC error
      },
      {
        RAResponse := cs_RandomAccessResponseConfig_Def (p_RAR_TA,p_Dl_Bandwidth),
        ContentionResolutionCtrl := cs_ContentionResolutionCtrl_ContRLCPDU_Def(p_RLC_PDU) // Step 19 success
      }
    }
  };

  // Templates for Diff Log Channel ID Configuration for RB0

  template (value) RadioBearer_Type cs_RB_Reconfig_DiffLCHID(RadioBearerId_Type   p_RBID,
                                                             TestLogicalChannelId_Type p_DiffLCHID) :=
  { /* @status    APPROVED */
    Id := p_RBID,
    Config := {
      AddOrReconfigure := {
        Pdcp := omit , // Keep As it is
        Rlc := omit,  // Keep As it is
        LogicalChannelId := omit, //Keep As it is
        Mac := {
          LogicalChannel := omit, //Keep As it is
          TestMode := {
            Info:=   cs_MAC_TestMode_DiffLCHID(p_DiffLCHID)
          }
        }
      }
    }
  };

  template (value) RLC_Configuration_Type cs_RLC_MAC_TestMode :=
  { /* @status    APPROVED */
    Rb := {
        TM := true
    },
    TestMode := omit
  };

  template (value) RadioBearer_Type cs_RB_Reconfig_MACDRBTestMode (RadioBearerId_Type   p_RBID,
                                                                   template (value) MAC_TestModeInfo_Type p_MAC_TestModeInfo) :=
  { /* @status    APPROVED */
    Id := p_RBID,
    Config := {
      AddOrReconfigure := {
        Pdcp := cs_PDCP_Configuration_None , // Configure for No PDCP layer
        Rlc := cs_RLC_MAC_TestMode,  // Configure RLC for MAC test mode
        LogicalChannelId := omit, //Keep As it is
        Mac := {
          LogicalChannel := omit, //Keep As it is
          TestMode := {
            Info:=   p_MAC_TestModeInfo
          }
        }
      }
    }
  };
 template (value) RadioBearer_Type cs_RB_Reconfig_NotAck_NextPDU (RadioBearerId_Type   p_RBID ) :=
  { /* @status     */
    Id := p_RBID,
    Config := {
      AddOrReconfigure := {
        Pdcp := omit , //Keep As it is
        Rlc := {
            Rb := omit,
            TestMode := {
               Info := { NotACK_NextRLC_PDU := Start }
        }
      },  // Configure RLC for No ACK for Next PDU
        LogicalChannelId := omit, //Keep As it is
        Mac := omit //Keep As it is
      }
    }
  };
  template (value) RadioBearer_Type cs_RB_Reconfig_DisableMACtestMode(RadioBearerId_Type p_RBID) :=
  { /* @status    APPROVED */
    Id := p_RBID,
    Config := {
      AddOrReconfigure := {
        Pdcp := omit , // Keep As it is
        Rlc := omit,  // Keep As it is
        LogicalChannelId := omit, //Keep As it is
        Mac := {
          LogicalChannel := omit, //Keep As it is
          TestMode := {
            None  := true
          }
        }
      }
    }
  };

  template (value) MAC_TestModeInfo_Type cs_MAC_TestMode_DiffLCHID (TestLogicalChannelId_Type p_DiffLCHID) :=
  { /* @status    APPROVED */
    DiffLogChId  := {
      LogChId := p_DiffLCHID
    },
    No_HeaderManipulation := NormalMode
  };

  template (value) MAC_TestModeInfo_Type cs_MAC_TestMode_NoHeaderManipulationDLOnly :=
  { /* @status    APPROVED */
    DiffLogChId := {
      ConfigLchId := true
    },
    No_HeaderManipulation := DL_SCH_Only
  };

  template (value) MAC_TestModeInfo_Type cs_MAC_TestMode_NoHeaderManipulationDL_UL :=
  { /* @status    APPROVED */
    DiffLogChId := {
      ConfigLchId := true
    },
    No_HeaderManipulation := DL_UL_SCH
  };

  template (value) MAC_TestModeInfo_Type cs_MAC_TestMode_NoHeaderManipulationULOnly:=
  {
    DiffLogChId := {
      ConfigLchId := true
    },
    No_HeaderManipulation := UL_SCH_Only
  };
  template (value) MAC_TestModeInfo_Type cs_MAC_TestMode_NormalMode :=
  { /* @status    APPROVED */
    DiffLogChId := {
      ConfigLchId := true
    },
    No_HeaderManipulation := NormalMode
  };


  }// End of group IE Templates

  // added for specific message contents
  /*36.523-1 Table 7.1.4.11.3.1-1 */

  template (value) UL_SCH_Config_Type cds_508_UL_SCH_Config_maxHARQ_Tx8
  modifies cs_UL_SCH_Config_DisableBSR := {
    maxHARQ_Tx := n8
  };

  template (value) MAC_MainConfig cds_508_MAC_MainConfig_RBC_maxHARQ_Tx8(template (value) DRX_Config p_DRX_Config)
  modifies cs_508_MAC_MainConfig_RBC := {
    /* Default values except maxHARQ_Tx according to 36.523-1 Table 7.1.4.11.3.1-1 */
    ul_SCH_Config := cds_508_UL_SCH_Config_maxHARQ_Tx8,
    phr_Config :={//@sic R5s100522 removal of PR config sic@
              release := NULL
    }
  };

  template (value) MAC_MainConfig_Type cs_508_MAC_MainConfig_RBC_maxHARQ_Tx8_Explicit_DrxL :=
  {
    explicitValue := cds_508_MAC_MainConfig_RBC_maxHARQ_Tx8(cs_508_DRX_Config_DrxL)
  };

  group ASP_Templates {

  template (value) SYSTEM_CTRL_REQ cas_C_RNTI_Config_REQ(CellId_Type p_CellId,
                                                         L1Mac_IndicationMode_Type p_C_RNTI) :=
  { /* @status    APPROVED */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, cs_TimingInfo_Now),
    Request := {
      L1MacIndCtrl := cs_EnableC_RNTI_Req ( p_C_RNTI)
    }
  };
  template (value) SYSTEM_CTRL_REQ cas_RLCPDU_DiscardConfig_REQ(CellId_Type p_CellId,
                                                                RadioBearerId_Type p_RB_Id,
                                                            template (value) TimingInfo_Type p_TimingInfo ,
                                                         Rlc_IndicationMode_Type p_IndMode) :=
  { /* @status     */
    Common := cs_ReqAspCommonPart_RB(p_CellId, p_RB_Id, p_TimingInfo),
    Request := {
      RlcIndCtrl := {
          Discard := p_IndMode
    }
  }
  };

  template (value) SYSTEM_CTRL_REQ cas_UL_HARQ_IndConfig_REQ(CellId_Type p_CellId,
                                                             L1Mac_IndicationMode_Type p_UL_HARQ_Mode) :=
  { /* @status     */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, cs_TimingInfo_Now),
    Request := {
      L1MacIndCtrl := cs_EnableUL_HARQ_Req ( p_UL_HARQ_Mode)
    }
  };

  template SYSTEM_IND car_C_RNTI_MAC_CntrlElem_IND(CellId_Type p_CellId,
                                                   template (present) TimingInfo_Type p_TimingInfo,
                                                   template (present) C_RNTI p_C_RNTI) :=
  { /* @status    APPROVED */
    Common := cr_IndAspCommonPart_SysInd (p_CellId,p_TimingInfo ),
    Indication := {
      C_RNTI := p_C_RNTI
    }
  };

  template SYSTEM_IND car_PHR_IND(CellId_Type p_CellId,
                                  template (present) TimingInfo_Type p_TimingInfo,
                                  template (present) PHR_Type p_PHR_Type) :=
  { /* @status    APPROVED */
    Common := cr_IndAspCommonPart_SysInd (p_CellId, p_TimingInfo),
    Indication := {
      PHR := p_PHR_Type
    }
  };
  template SYSTEM_IND car_RlcDiscard_IND(CellId_Type p_CellId,
                                  template (present) TimingInfo_Type p_TimingInfo,
                                  template (present) integer p_DiscardSqn) :=
  { /* @status     */
    Common := cr_IndAspCommonPart_SysInd (p_CellId, p_TimingInfo),
    Indication := {
      RlcDiscardInd := {
          SequenceNumber  := p_DiscardSqn
    }
  }
  };

  template BSR_Type cr_TruncatedBSR_Ind ( template (present) integer p_LCG,
                                      template (present) integer p_BSR_Value) :=
  { /* @status     */
    Truncated := {
      LCG  :=  p_LCG,          /* Logical channel Group */
      Value := p_BSR_Value     /* BSR value */
    }
  };


  //R5-094195
  template MAC_PDU_Type cr_MAC_PDU_ShortBSR_2Padding_RLCPDU ( B5_Type p_LCh_Id,
                                                               template(present) B2_Type p_LCG,
                                                               template(present) B6_Type p_BSR_Value,
                                                               template (present) MAC_SDU_Type p_MAC_SDU ):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cdr_SubHeader_ShortBSR_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LCh_Id)
    },
    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                   * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {p_MAC_SDU},             /* MAC SDUs, which can typically be RLC PDUs */
    Padding := *                        /* padding bytes apart from the last subheader byte */
  };
 

  template (value) PhichTestMode_Type cs_PhichTestModeNormal :=
  { /* @status    APPROVED */
    NormalMode  := true
  };

  template (value) SYSTEM_CTRL_REQ cas_L1_Test_DL_SCH_CRC_REQ(CellId_Type p_CellId,
                                                              template (value) DL_SCH_CRC_Type p_DL_SCH_CRC,
                                                              template (value) TimingInfo_Type p_TimingInfo := cs_TimingInfo_Now) :=
  { /* @status    APPROVED */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      L1_TestMode := {
        DL_SCH_CRC  := p_DL_SCH_CRC,
        Phich       := cs_PhichTestModeNormal
      }
    }
  };

  template (value) SYSTEM_CTRL_REQ cas_L1_Test_DL_SCH_CRC_TimingInfo_REQ(CellId_Type p_CellId,
                                                                         template (value) TimingInfo_Type p_TimingInfo,
                                                                         template (value) DL_SCH_CRC_Type p_DL_SCH_CRC) :=
  { /* TO BE REPLACED BY  cas_L1_Test_DL_SCH_CRC_REQ */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      L1_TestMode := {
        DL_SCH_CRC  := p_DL_SCH_CRC,
        Phich       := cs_PhichTestModeNormal
      }
    }
  };

  template (value) SYSTEM_CTRL_REQ cas_L1_Test_PhichMode_REQ(CellId_Type p_CellId,
                                                             template (value) PhichTestMode_Type p_PhichTestMode) :=
  {
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, cs_TimingInfo_Now),
    Request := {
      L1_TestMode := {
        DL_SCH_CRC  := cs_DL_SCH_CRC_C_RNTI_Error(Normal),
        Phich       := p_PhichTestMode
      }
    }
  };

  template (value) PhichTestMode_Type cs_Phich_ExplicitMode(template (value)HARQ_ModeList_Type p_HARQ_ModeList) :=
  {
    ExplicitMode := p_HARQ_ModeList
  };
  //template (value)HARQ_Type cs_HARQ_Nack := nack;
  //template (value)HARQ_Type cs_HARQ_Ack := ack;
  template (value) HARQ_ModeList_Type cs_HARQ_ModeList_28Nack :=
  {
    nack, nack,nack,nack,nack,nack,nack,
    nack, nack,nack,nack, nack,nack,nack,
    nack, nack,nack,nack, nack,nack,nack,
    nack, nack,nack,nack, nack,nack,nack
  };
  template (value) HARQ_ModeList_Type cs_HARQ_ModeList_4Nack_Ack_2Nack :=
  {
    nack, nack,nack, nack,ack,nack,nack
  };
  template (value) HARQ_ModeList_Type cs_HARQ_ModeList_Nack_2Ack :=
  {
    nack, ack,ack
  };
  template (value) HARQ_ModeList_Type cs_HARQ_ModeList_3Nack_Ack :=
  {
    nack, nack,nack,ack
  };

  template (value) DL_SCH_CRC_Type cs_DL_SCH_CRC_C_RNTI_Error(MAC_Test_DL_SCH_CRC_Mode_Type p_CRC_Mode) :=
  { /* @status    APPROVED */
    C_RNTI := p_CRC_Mode
  };
  
  template (value) DL_SCH_CRC_Type cs_DL_SCH_CRC_SI_RNTI_Error(MAC_Test_DL_SCH_CRC_Mode_Type p_CRC_Mode) :=
  { /* @status    APPROVED */
    SI_RNTI := p_CRC_Mode
  };
  
  } // End of group ASP_Templates


  group RRC_MsgTemplates{
  //----------------------------------------------------------------------------
  // RRCConnectionReconfiguration (36.331 cl. 6.2.2)
  template (value) MAC_MainConfig cs_508_MAC_MainConfig_RBC_DisableBSR(template (omit) DRX_Config p_DRX_Config) :=
  { /* Default values according to 36.508 cl. 4.8.2.1.5 Table 4.8.2.1.5-1 */
    /* @status    APPROVED */
    ul_SCH_Config := cs_UL_SCH_Config_DisableBSR,
    drx_Config := p_DRX_Config,
    timeAlignmentTimerDedicated := sf750,
    phr_Config := {
      release := NULL
    }
  };

  template (value) MAC_MainConfig cds_MAC_MainConfig_RBC_DisableBSR_TA_Infinity (template (omit) DRX_Config p_DRX_Config)
    modifies cs_508_MAC_MainConfig_RBC_DisableBSR :=
  { /* Default values according to 36.508 cl. 4.8.2.1.5 Table 4.8.2.1.5-1 (using condition DRX_L) */
    /* @status    APPROVED */
    timeAlignmentTimerDedicated := infinity_
  };

  //R5-095110
  template (value) MAC_MainConfig_Type cs_MAC_MainConfig_Explicit_DisableBSR_TA_Infinity :=
  { /* @status    APPROVED */
    explicitValue := cds_MAC_MainConfig_RBC_DisableBSR_TA_Infinity(f_GetUeDrxConfig ( DRX_L ))
  };

  template (value) MAC_MainConfig cs_MAC_MainConfiguration_PHR_Enable71415 :=
  { /* @status    APPROVED */
    ul_SCH_Config := omit,
    drx_Config := omit,
    timeAlignmentTimerDedicated := sf750, // default value
    phr_Config := {
      setup := {
        periodicPHR_Timer := sf200,
        prohibitPHR_Timer := sf1000,
        dl_PathlossChange := infinity_
      }
    }
  };

  template (value) MAC_MainConfig cs_MAC_MainConfiguration_PHR_Enable71416 :=
  { /* @status    APPROVED */
    ul_SCH_Config := omit,
    drx_Config := omit,
    timeAlignmentTimerDedicated := sf750, // default value
    phr_Config := {
      setup := {
        periodicPHR_Timer := infinity_,
        prohibitPHR_Timer := sf1000,
        dl_PathlossChange := dB3
      }
    }
  };

  template (value) MAC_MainConfig cs_MAC_MainConfiguration_PHR_Disable :=
  { /* @status    APPROVED */
    ul_SCH_Config := omit,
    drx_Config := omit,
    timeAlignmentTimerDedicated := sf750, // default value
    phr_Config := {
      release := NULL
    }
  };

  template (value) RadioResourceConfigDedicated  cs_RadioResourceConfigDedicated_PhyConfig (template (value) PhysicalConfigDedicated p_PhysicalConfigDedicated) :=
  { /* @status    APPROVED */
    srb_ToAddModList := omit,
    drb_ToAddModList := omit,
    drb_ToReleaseList := omit,
    mac_MainConfig := omit,
    sps_Config := omit,
    physicalConfigDedicated := p_PhysicalConfigDedicated
  };

  template (value) PhysicalConfigDedicated cds_PhysicalConfigDedicated_PUCCH_Resync( template (omit) CQI_ReportPeriodic p_CQI_ReportingPeriodic,
                                                                                     template (omit) SoundingRS_UL_ConfigDedicated p_SoundingRsUl_ConfigDedicated,
                                                                                     template (value) PhysicalConfigDedicated_AntennaInfo_Type p_AntennaInfo,
                                                                                     SR_PUCCH_ResourceIndex_Type p_SR_PUCCH_ResourceIndex,
                                                                                     SR_ConfigIndex_Type p_SR_ConfigIndex,    // @sic R5-102177 sic@
                                                                                     Dsr_TransMax_Type p_Dsr_TransMax := n4   //@sic R5s100279
                                                                                     )
    modifies cs_508_PhysicalConfigDedicated_Default_RBC :=
  { /* Default values to be used when UE PUCCH Sych is lost */
    /* @status    APPROVED */
    tpc_PDCCH_ConfigPUCCH := omit,
    tpc_PDCCH_ConfigPUSCH := omit,
    antennaInfo := omit,
    schedulingRequestConfig := cs_508_SchedulingRequest_Config_Default ( p_SR_PUCCH_ResourceIndex,p_SR_ConfigIndex,p_Dsr_TransMax ) // @sic R5s090368 sic@
  };
  


  template (value) MAC_MainConfig_Type cds_MAC_MainConfig_Explicit_MaxHarq_Tx (MaxHARQ_Tx_Type p_MaxHARQ_Tx)
    modifies cs_508_MAC_MainConfig_Explicit_RBC_DrxL_DisableBSR_PHR :=
  {
    explicitValue := {
      ul_SCH_Config := {
        maxHARQ_Tx := p_MaxHARQ_Tx
        // periodicBSR_Timer := infinity_
        // retxBSR_Timer := sf10240
        // ttiBundling := false
      }
    }
  };

  template (value) MAC_MainConfig_Type cds_MAC_MainConfig_Explicit_PeriodicBSR_Timer (PeriodicBSR_Timer_Type p_PeriodicBSR_Timer)
    modifies cs_508_MAC_MainConfig_Explicit_RBC_DrxL_DisableBSR_PHR :=
  { /* @status    APPROVED */
    explicitValue := {
      ul_SCH_Config := {
        // maxHARQ_Tx := n5
        periodicBSR_Timer := p_PeriodicBSR_Timer
        // retxBSR_Timer := sf10240
        // ttiBundling := false
      }
    }
  };

  template (value) MAC_MainConfig_Type cds_MAC_MainConfig_Explicit_RetxBSR_Timer (RetxBSR_Timer_Type p_RetxBSR_Timer)
    modifies cs_508_MAC_MainConfig_Explicit_RBC_DrxL_DisableBSR_PHR :=
  { /* @status    APPROVED */
    explicitValue := {
      ul_SCH_Config := {
        // maxHARQ_Tx := n5
        // periodicBSR_Timer := infinity_
        retxBSR_Timer := p_RetxBSR_Timer
        // ttiBundling := false
      }
    }
  };

  template (value) MAC_MainConfig_Type cs_MAC_MainConfig_Explicit_RBC_DrxL( integer p_CycleStartOffset ) :=
  { /* @status    APPROVED */
    explicitValue := cs_MAC_MainConfig_RBC_DrxL(p_CycleStartOffset)
  };

  template (value) LogicalChannelConfig cds_LogicalChannelConfig_DRB_AM (integer p_Priority,
                                                                         integer p_LCG)
    modifies  cs_508_LogicalChannelConfig_DRB_AM :=
  { /* Default values according to 36.508 cl. 4.8.2.1.4 Table 4.8.2.1.4-1 (using condition LO) */
    /* @status    APPROVED */
    ul_SpecificParameters := {
      priority := p_Priority,
      logicalChannelGroup := p_LCG
    }
  };
  
  template (value) LogicalChannelConfig cds_LogicalChannelConfig_PrioritizedBitRate_DRB_AM (integer p_Priority,
                                                                                            PrioritizedBitRate_Type p_PrioritizedBitRate,
                                                                                            integer p_LCG)
    modifies  cs_508_LogicalChannelConfig_DRB_AM :=
  { /* Default values according to 36.508 cl. 4.8.2.1.4 Table 4.8.2.1.4-1 (using condition LO) */
    /* @status    APPROVED */
    /* @sic R5s100268 sic@ */
    ul_SpecificParameters := {
      priority := p_Priority,
      prioritisedBitRate := p_PrioritizedBitRate,
      logicalChannelGroup := p_LCG
    }
  };

  //------------------------------------------------
  //cs_Measurement_Config
  // R5-104535
  template (value) MeasConfig cs_Measurement_Config(ARFCN_ValueEUTRA p_EUTRA_DL_CarrierFreq,
                                                    AllowedMeasBandwidth p_MeasurementBandwidth,
                                                    template (value) ReportConfigToAddMod.reportConfig p_ReportConfig := cs_508_ReportConfigEUTRA_Periodical,
                                                    template (omit) MeasGapConfig p_MeasGapConfig := omit) :=
    /* @status    APPROVED */
    cs_MeasConfig(omit,
                  cs_MeasObjectToAddModList_1Entry(tsc_IdMeasObject_f1,
                                                   cs_MeasObject_measObjectEUTRA_Common(p_EUTRA_DL_CarrierFreq,
                                                                                        p_MeasurementBandwidth,
                                                                                        omit,
                                                                                        omit,
                                                                                        omit)),
                  omit,
                  cs_ReportConfigToAddModList_1Entry(tsc_IdReportConfig_A1, p_ReportConfig),
                  omit,
                  cs_MeasIdToAddModList_1Entry( 1, tsc_IdMeasObject_f1, tsc_IdReportConfig_A1 ),
                  omit,
                  p_MeasGapConfig);

  } // End of group RRC_MsgTemplates


  group DRB_Templates {
  template MAC_PDU_Type cr_MAC_PDU_1SubHeader_1Padding ( B5_Type p_LchId,
                                                         template (present) MAC_SDU_Type p_MAC_SDU ) :=
  { /* @status    APPROVED */
    Header := {                 /* list of MAC PDU SubHeaders corresponding to
                                 * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LchId) // length not checked
    },
    CtrlElementList := omit,    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding := omit             /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_NoPadding_RLCPDU_LCID ( B5_Type p_LchId,
                                                           template (present) MAC_SDU_Type p_MAC_SDU ) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LchId)           // length not checked
    },
    CtrlElementList := omit,                                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},                             /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit                                     /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_Any  :=
  { /* @status    APPROVED */
    Header := ?,
    CtrlElementList := *,               /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := *,               /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  *               /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_NoSDU  :=
  {
    Header := ?,
    CtrlElementList := *,               /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := omit,            /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := *                /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_ShortBSR ( B2_Type p_LCG,
                                              template(present) B6_Type p_BSR_Value):=
  { /* @status     */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_SubHeader_ShortBSR
    },

    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                   * "MAC control elements, are always placed before any MAC SDU." */
    SduList         :=  omit,                                     /* No MAC SDUs, which can typically be RLC PDUs */
    Padding         := *                                          /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_ShortBSR_2Padding ( B2_Type p_LCG,
                                                        template(present) B6_Type p_BSR_Value):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_ShortBSR_MoreSubHeaders, //@sic R5s090377 sic@
      cr_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList     := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                       * "MAC control elements, are always placed before any MAC SDU." */
    SduList             :=  omit,                                     /* No MAC SDUs, which can typically be RLC PDUs */
    Padding             :=  cr_Octet1_Any                             /* padding bytes acc. to CR R2-093439 for these purposes */
    //@sic R5s090377 sic@
  };

  template MAC_PDU_Type cr_MAC_PDU_2Padding_ShortBSR ( B2_Type p_LCG,
                                                        template(present) B6_Type p_BSR_Value):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_SubHeader_ShortBSR
    },
    CtrlElementList      := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                        * "MAC control elements, are always placed before any MAC SDU." */
    SduList              :=  omit,   /* No MAC SDUs, which can typically be RLC PDUs */
    Padding              :=  omit
  };

  template MAC_PDU_Type cr_MAC_PDU_1Subheader_ShortBSR_RLCPDU (B5_Type p_LCh_Id,
                                                               template(present) B2_Type p_LCG,
                                                               template(present) B6_Type p_BSR_Value,
                                                               template (present) MAC_SDU_Type p_MAC_SDU ):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_ShortBSR_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LCh_Id)
    },
    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                   * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit                /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_1Subheader_TruncatedBSR_RLCPDU (B5_Type p_LCh_Id,
                                                                   B2_Type p_LCG,
                                                                   template(present) B6_Type p_BSR_Value,
                                                                   template (present) MAC_SDU_Type p_MAC_SDU ):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_TruncatedBSR_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LCh_Id)
    },
    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                   * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding := *                /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR_2PaddingSubheader_RLCPDU (template(present) B6_Type p_BS1,
                                                                     template(present) B6_Type p_BS2,
                                                                     template(present) B6_Type p_BS3,
                                                                     template(present) B6_Type p_BS4,
                                                                     B5_Type p_LCh_Id,
                                                                     template(present) MAC_SDU_Type p_MAC_SDU) :=
  {
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_SubHeader_LongBSR,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LCh_Id)
    },
    CtrlElementList      := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList         := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  omit            /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR_2PaddingSubheader_2RLCPDU (template(present) B6_Type p_BS1,
                                                                      template(present) B6_Type p_BS2,
                                                                      template(present) B6_Type p_BS3,
                                                                      template(present) B6_Type p_BS4,
                                                                      B5_Type p_LCh_Id,
                                                                      template(present) MAC_SDU_Type p_MAC_SDU,
                                                                      B5_Type p_LCh_Id2,
                                                                      template(present) MAC_SDU_Type p_MAC_SDU2) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cdr_SubHeader_LongBSR_MoreSubHeaders, //@sic R5s100274
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU2), p_LCh_Id),
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LCh_Id2)
    },
    CtrlElementList := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */
    
    SduList         := {p_MAC_SDU,p_MAC_SDU2},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  omit            /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR_RLCPDU (B5_Type p_LCh_Id,
                                                   template(present) B6_Type p_BS1,
                                                   template(present) B6_Type p_BS2,
                                                   template(present) B6_Type p_BS3,
                                                   template(present) B6_Type p_BS4,
                                                   template(present) MAC_SDU_Type p_MAC_SDU) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_LongBSR_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LCh_Id)
    },
    CtrlElementList := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList :=  {p_MAC_SDU},      /* MAC SDUs, which can typically be RLC PDUs */
    Padding :=  omit     //padding bytes apart from the last subheader byte
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR (template(present) B6_Type p_BS1,
                                            template(present) B6_Type p_BS2,
                                            template(present) B6_Type p_BS3,
                                            template(present) B6_Type p_BS4) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_SubHeader_LongBSR
    },
    CtrlElementList      := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList              :=  omit,   /* No MAC SDUs*/
    Padding              :=  omit    /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_NoPadding_RLCPDU_LCID ( B5_Type p_LchId, MAC_SDU_Type p_MAC_SDU ) :=
  { /* @status    APPROVED */
    Header := {                                 /* list of MAC PDU SubHeaders corresponding to
                                                 * MAC control elements and MAC SDUs */
      cs_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LchId)
    },
    CtrlElementList := omit,                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},             /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  omit                    /* padding bytes apart from the last subheader byte */
  };

  template  MAC_PDU_SubHeader_Type cdr_SubHeader_LongBSR_MoreSubHeaders
  modifies cr_SubHeader_LongBSR :=
  { /* @status    APPROVED */
    Extension          := tsc_ExtensionMoreHeaders
  };

  template  MAC_CTRL_LongBSR_Type cr_MAC_BSR_Long (template(present) B6_Type p_LCG1,
                                                   template(present) B6_Type p_LCG2,
                                                   template(present) B6_Type p_LCG3,
                                                   template(present) B6_Type p_LCG4 ) :=
  { /* @status    APPROVED */
    Value_LCG1   := p_LCG1,
    Value_LCG2   := p_LCG2,
    Value_LCG3   := p_LCG3,
    Value_LCG4   := p_LCG4
  };

  template  MAC_CTRL_ElementList_Type cr_CTRL_Elem_LongBSR( template(present) B6_Type p_LCG1,
                                                            template(present) B6_Type p_LCG2,
                                                            template(present) B6_Type p_LCG3,
                                                            template(present) B6_Type p_LCG4 ) :=
  { /* @status    APPROVED */
    ShortBSR               := omit,                                  /* UL only */
    LongBSR                := cr_MAC_BSR_Long(p_LCG1, p_LCG2, p_LCG3, p_LCG4),        /* UL only */
    C_RNTI                 := omit,                                  /* UL only */
    ContentionResolutionID := omit,                                  /* DL only */
    TimingAdvance          := omit,
    PowerHeadRoom          := omit                                   /* UL only */
  };

  template  MAC_PDU_SubHeader_Type cr_SubHeader_LongBSR :=
  { /* @status    APPROVED */
    Reserved           := tsc_B2_Reserved,       /* Reserved bits */
    Extension          := tsc_ExtensionNoMoreHeaders,
    LCID               := tsc_LchId_LongBSR,
    Length             := omit
  };

  template  MAC_CTRL_ShortBSR_Type cr_MAC_BSR_Short (template(present) B2_Type p_LCG,
                                                     template(present) B6_Type p_BSR_Value) :=
  { /* @status    APPROVED */
    LCG     := p_LCG,
    Value   := p_BSR_Value
  };

  template  MAC_CTRL_ElementList_Type cr_CTRL_Elem_ShortBSR(template(present) B2_Type p_LCG,
                                                            template(present) B6_Type p_BSR_Value) :=
  { /* @status    APPROVED */
    ShortBSR               := cr_MAC_BSR_Short(p_LCG, p_BSR_Value),        /* UL only */
    LongBSR                := omit,                                  /* UL only */
    C_RNTI                 := omit,                                  /* UL only */
    ContentionResolutionID := omit,                                  /* DL only */
    TimingAdvance          := omit,
    PowerHeadRoom          := omit                                   /* UL only */
  };

  template  MAC_PDU_SubHeader_Type cr_SubHeader_ShortBSR :=
  { /* @status    APPROVED */
    Reserved           := tsc_B2_Reserved,       /* Reserved bits */
    Extension          := tsc_ExtensionNoMoreHeaders,
    LCID               := tsc_LchId_ShortBSR,
    Length             := omit
  };

  template MAC_PDU_SubHeader_Type cdr_SubHeader_ShortBSR_MoreSubHeaders
  modifies cr_SubHeader_ShortBSR :=
  { /* @status    APPROVED */
    Extension := tsc_ExtensionMoreHeaders
  };

  template  MAC_PDU_SubHeader_Type cr_SubHeader_TruncatedBSR :=
  { /* @status    APPROVED */
    Reserved           := tsc_B2_Reserved,       /* Reserved bits */
    Extension          := tsc_ExtensionNoMoreHeaders,
    LCID               := tsc_LchId_TruncatedBSR,
    Length             := omit
  };

  template MAC_PDU_SubHeader_Type cdr_SubHeader_TruncatedBSR_MoreSubHeaders
  modifies cr_SubHeader_TruncatedBSR :=
  { /* @status    APPROVED */
    Extension := tsc_ExtensionMoreHeaders
  };

  template MAC_PDU_SubHeader_Type cdr_SubHeader_LongBSR_MoreSubheaders
  modifies cr_SubHeader_LongBSR :=
  {
    Extension := tsc_ExtensionMoreHeaders
  };

  template MAC_PDU_Type cr_MAC_PDU_ShortBSR_1Padding ( B2_Type p_LCG, template(present) B6_Type p_BSR_Value):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_SubHeader_ShortBSR
    },
    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                   * "MAC control elements, are always placed before any MAC SDU." */
    SduList         :=  omit,           /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit                /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_ShortBSR_1Padding_RLCPDU ( B2_Type p_LCG,
                                                               template(present) B6_Type p_BSR_Value,
                                                               B5_Type p_LchId,
                                                               template(present) MAC_SDU_Type p_MAC_SDU):=
  {
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cdr_SubHeader_ShortBSR_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LchId)
    },


    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value), /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                   * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit               /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_1SubHeader_2Padding_RLCPDU (B5_Type p_LCh_Id,
                                                                       template (value) MAC_SDU_Type p_MAC_SDU ) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cs_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LCh_Id)
    },
    CtrlElementList := omit,            /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  omit            /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR_1Subheader(template (present) B6_Type p_BS1,
                                                      template (present) B6_Type p_BS2,
                                                      template (present) B6_Type p_BS3,
                                                      template (present) B6_Type p_BS4,
                                                      template (present) MAC_PDU_SubHeader_Type p_MAC_PDU_SubHeader,
                                                      template (present) MAC_SDU_Type p_MAC_SDU,
                                                      template (present) PDCP_SDU_Type p_Padding) :=
  { /* @status     */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_LongBSR_MoreSubHeaders,
      p_MAC_PDU_SubHeader,
      cr_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList :=  {p_MAC_SDU},            /* MAC SDUs, which can typically be RLC PDUs */
    Padding :=  p_Padding               /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_ShortBSR_1Subheader (template (present) B2_Type p_LCG,
                                                        template (present) B6_Type p_BSR_Value,
                                                        template (present) MAC_PDU_SubHeader_Type p_MAC_PDU_SubHeader,
                                                        template (present) MAC_SDU_Type p_MAC_SDU,
                                                        template (present) PDCP_SDU_Type p_Padding) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_ShortBSR_MoreSubHeaders,
      p_MAC_PDU_SubHeader,
      cr_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList              :=  {p_MAC_SDU},       /* MAC SDUs, which can typically be RLC PDUs */
    Padding              :=  p_Padding          /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR_2Subheader_Short_Padding (template(present) B6_Type p_BS1,
                                                                     template(present) B6_Type p_BS2,
                                                                     template(present) B6_Type p_BS3,
                                                                     template(present) B6_Type p_BS4,
                                                                     B5_Type p_LchId,
                                                                     B7_Type p_Length,
                                                                     template(present) MAC_SDU_Type p_MAC_SDU,
                                                                     B5_Type p_LchId2,
                                                                     B7_Type p_Length2,
                                                                     template(present) MAC_SDU_Type p_MAC_SDU2,
                                                                     template (present) PDCP_SDU_Type p_Padding) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_LongBSR_MoreSubHeaders,
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LchId,p_Length),
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LchId2,p_Length2),
      cr_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList      := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList              :=  {p_MAC_SDU,p_MAC_SDU2},       /* MAC SDUs, which can typically be RLC PDUs */
    Padding              :=  p_Padding                     /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_3Subheader_Short_NoPadding ( B5_Type p_LchId,
                                                                B7_Type p_Length,
                                                                template(present) MAC_SDU_Type p_MAC_SDU,
                                                                B5_Type p_LchId2,
                                                                B7_Type p_Length2,
                                                                template(present) MAC_SDU_Type p_MAC_SDU2,
                                                                B5_Type p_LchId3,
                                                                template(present) MAC_SDU_Type p_MAC_SDU3) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LchId, p_Length),
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LchId2, p_Length2),
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LchId3) // @sic R5-101179 post wk11
    },
    CtrlElementList      := omit,
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */
    
    SduList              :=  {p_MAC_SDU, p_MAC_SDU2, p_MAC_SDU3},       /* MAC SDUs, which can typically be RLC PDUs */
    Padding              :=  omit                     /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_ShortBSR_2Subheader_Short_Padding (template (present) B2_Type p_LCG,
                                                                      template (present) B6_Type p_BSR_Value,
                                                                      B5_Type p_LchId,
                                                                      B7_Type p_Length,
                                                                      template(present) MAC_SDU_Type p_MAC_SDU,
                                                                      B5_Type p_LchId2,
                                                                      B7_Type p_Length2,
                                                                      template(present) MAC_SDU_Type p_MAC_SDU2,
                                                                      template (present) PDCP_SDU_Type p_Padding) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_ShortBSR_MoreSubHeaders,
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LchId,p_Length),
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LchId2,p_Length2),
      cr_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList      := cr_CTRL_Elem_ShortBSR(p_LCG, p_BSR_Value),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList              :=  {p_MAC_SDU,p_MAC_SDU2},       /* MAC SDUs, which can typically be RLC PDUs */
    Padding              :=  p_Padding                     /* padding bytes apart from the last subheader byte */
  };


  template MAC_PDU_Type cr_MAC_PDU_LongBSR_2PaddingSubheader (template(present) B6_Type p_BS1,
                                                              template(present) B6_Type p_BS2,
                                                              template(present) B6_Type p_BS3,
                                                              template(present) B6_Type p_BS4) :=
  {
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_SubHeader_LongBSR
    },
    CtrlElementList      := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList :=  omit,         /* MAC SDUs, which can typically be RLC PDUs */
    Padding :=  omit          /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_1SubHeader_1Padding(B5_Type p_LCh_Id,
                                                               MAC_SDU_Type p_MAC_SDU) :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cs_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LCh_Id)
    },
    CtrlElementList := omit,            /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit             /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_CRNTI_CNTRLElem_1Padding_RLCPDU (template (present) C_RNTI p_C_RNTI,
                                                                    B5_Type p_LchId,
                                                                    template (present) MAC_SDU_Type p_MAC_SDU ) :=

  { /* @status    APPROVED */
    Header := { /* list of MAC PDU SubHeaders corresponding to MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cdr_MAC_PDU_SubHeader_CRNTI_CNTRLElem_MoreHeaders,
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LchId) // length not checked
    },
    CtrlElementList := cr_MAC_CTRL_ElementList_CRNTI (p_C_RNTI), /* Mac control elements; acc. to 36.321 cl. 6.1.2* "MAC control elements, are always placed before any MAC SDU." */

    SduList := {p_MAC_SDU},     /* MAC SDUs, which can typically be RLC PDUs */
    Padding := omit             /* padding bytes apart from the last subheader byte */
  };

  template  MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_CRNTI_CNTRLElem :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := tsc_LchId_CRNTI,
    Length     := omit
  };

  template MAC_PDU_SubHeader_Type cdr_MAC_PDU_SubHeader_CRNTI_CNTRLElem_MoreHeaders
  modifies cr_MAC_PDU_SubHeader_CRNTI_CNTRLElem :=
  { /* @status    APPROVED */
    Extension := tsc_ExtensionMoreHeaders
  };

  template MAC_CTRL_ElementList_Type cr_MAC_CTRL_ElementList_CRNTI (template (present) C_RNTI p_C_RNTI):=
  { /* @status    APPROVED */
    ShortBSR               := omit,        /* UL only */
    LongBSR                := omit,        /* UL only */
    C_RNTI                 := p_C_RNTI,    /* UL only */

    ContentionResolutionID := omit,        /* DL only */
    TimingAdvance          := omit,        /* DL only */
    PowerHeadRoom          := omit         /* UL only */
  };


  template MAC_PDU_Type cr_MAC_PDU_CRNTI_CNTRLElem_1Padding (template (present) C_RNTI p_C_RNTI):=
  { /* @status     */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_CRNTI_CNTRLElem
    },
    CtrlElementList := cr_MAC_CTRL_ElementList_CRNTI (p_C_RNTI),        /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList := omit,                    /* MAC SDUs, which can typically be RLC PDUs */
    Padding := omit                     /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_2Padding_ShortBSR_CRNTI_CNTRLElem (template (present) C_RNTI p_C_RNTI):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cdr_SubHeader_ShortBSR_MoreSubHeaders,
      cr_MAC_PDU_SubHeader_CRNTI_CNTRLElem
    },
    CtrlElementList := cr_MAC_CTRL_ElementList_CRNTI_BSR (p_C_RNTI,cr_MAC_BSR_Short(?, ?)),        /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList := omit,                    /* MAC SDUs, which can typically be RLC PDUs */
    Padding := omit                     /* padding bytes apart from the last subheader byte */
  };
  template MAC_PDU_Type cr_MAC_PDU_2Padding_CRNTI_CNTRLElem_ShortBSR (template (present) C_RNTI p_C_RNTI):=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cdr_MAC_PDU_SubHeader_CRNTI_CNTRLElem_MoreHeaders,
      cr_SubHeader_ShortBSR
    },
    CtrlElementList := cr_MAC_CTRL_ElementList_CRNTI_BSR (p_C_RNTI,cr_MAC_BSR_Short(?, ?)),        /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList := omit,                    /* MAC SDUs, which can typically be RLC PDUs */
    Padding := omit                     /* padding bytes apart from the last subheader byte */
  };
  template MAC_CTRL_ElementList_Type cr_MAC_CTRL_ElementList_CRNTI_BSR (template (present) C_RNTI p_C_RNTI,
                                                                        template (present) MAC_CTRL_ShortBSR_Type p_ShortBSR):=
  { /* @status    APPROVED */
    ShortBSR               := p_ShortBSR,        /* UL only */
    LongBSR                := omit,        /* UL only */
    C_RNTI                 := p_C_RNTI,    /* UL only */

    ContentionResolutionID := omit,        /* DL only */
    TimingAdvance          := omit,        /* DL only */
    PowerHeadRoom          := omit         /* UL only */
  };


  template (value) DRB_COMMON_REQ cas_DRB_COMMON_REQ_SubframeDataList(CellId_Type p_CellId,
                                                                      RadioBearerId_Type p_RB_Id,
                                                                      template (value) TimingInfo_Type p_TimingInfo,
                                                                      template (value) DRB_DataPerSubframeList_DL_Type p_DataPerSubframeList) :=
  { /* @status     */
    Common := cs_ReqAspCommonPart_RB(p_CellId, p_RB_Id, p_TimingInfo),
    U_Plane := {
      SubframeDataList := p_DataPerSubframeList
    },
    SuppressPdcchForC_RNTI := omit
  };

  template (value) DRB_COMMON_REQ cas_DRB_COMMOM_REQ_MAC_PDU(CellId_Type p_CellId,
                                                             RadioBearerId_Type p_RB_Id,
                                                             template (value) TimingInfo_Type p_TimingInfo,
                                                             template (value)  MAC_PDUList_Type p_MAC_PDUList,
                                                             template (value) HarqProcessAssignment_Type p_HarqProcess := cs_HarqProcessAssignment_Automatic,
                                                             integer p_SubframeOffset := tsc_SubframeOffset0) :=
  { /* Template for DRB Data REQ wih PDCP SDU's */
    /* @status    APPROVED */
    Common := cs_ReqAspCommonPart_RB(p_CellId, p_RB_Id, p_TimingInfo),
    U_Plane := {
      SubframeDataList := {
        {
          SubframeOffset := p_SubframeOffset,
          HarqProcess := p_HarqProcess,
          PduSduList   :=
          {
            MacPdu := p_MAC_PDUList
          }
        }
      }
    },
    SuppressPdcchForC_RNTI := omit
  };

  template (value) DRB_COMMON_REQ cads_DRB_COMMOM_REQ_MAC_PDU_NoCRNTI_Grant(CellId_Type p_CellId,
                                                                            RadioBearerId_Type p_RB_Id,
                                                                            template (value) TimingInfo_Type p_TimingInfo,
                                                                            template (value)  MAC_PDUList_Type p_MAC_PDUList,
                                                                            template (value) HarqProcessAssignment_Type p_HarqProcess := cs_HarqProcessAssignment_Automatic,
                                                                            integer p_SubframeOffset := tsc_SubframeOffset0)
    modifies cas_DRB_COMMOM_REQ_MAC_PDU :=
  {
     SuppressPdcchForC_RNTI:= true
  };

  template  DRB_COMMON_IND car_DRB_COMMON_IND_MAC (CellId_Type p_CellId,
                                                   RadioBearerId_Type p_RbId,
                                                   template (present) TimingInfo_Type p_TimingInfo,
                                                   template MAC_PDUList_Type p_MAC_PDUList) :=
  { /* @status    APPROVED */
    Common   := cr_IndAspCommonPart_RB(p_CellId, p_RbId, p_TimingInfo),
    U_Plane := {
      SubframeData   := {
        PduSduList   :=
        {
          MacPdu  := p_MAC_PDUList
        },
        NoOfTTIs   := 1
        // @sic R5w100222 slide 4 - RedundancyVersion removed sic@
      }
    }
  };

  template MAC_PDU_Type cr_MAC_PDU_LongBSR_Padding (template(present) B6_Type p_BS1,
                                                    template(present) B6_Type p_BS2,
                                                    template(present) B6_Type p_BS3,
                                                    template(present) B6_Type p_BS4,
                                                    template (present) PDCP_SDU_Type p_Padding) :=
  {
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cdr_SubHeader_LongBSR_MoreSubHeaders,
      cr_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList      := cr_CTRL_Elem_LongBSR(p_BS1, p_BS2, p_BS3, p_BS4),
    /* Mac control elements; acc. to 36.321 cl. 6.1.2
     * "MAC control elements, are always placed before any MAC SDU." */

    SduList :=  omit,            /* MAC SDUs, which can typically be RLC PDUs */
    Padding :=  p_Padding               /* padding bytes apart from the last subheader byte */
  };

  template  DRB_COMMON_IND car_DRB_COMMON_IND_RLC_PDUList (CellId_Type p_CellId,
                                                           RadioBearerId_Type p_RbId,
                                                           template (present) TimingInfo_Type p_TimingInfo,
                                                           template  RLC_PDUList_Type p_RLC_PDUList) :=
  { /* common ASP to receive PDUs from DRBs */
    /* @status    APPROVED */
    Common   := cr_IndAspCommonPart_RB(p_CellId, p_RbId, p_TimingInfo),
    U_Plane := {
      SubframeData := {
        PduSduList := {
          RlcPdu := p_RLC_PDUList
        },
        NoOfTTIs := 1
        // @sic R5w100222 slide 4 - RedundancyVersion removed sic@
      }
    }
  };

  template (value) PDCP_SDUList_Type cs_PDCP_SDUList_10Def :=
  { /* @status    APPROVED */
    crs_PDCP_SDU_16B,
    crs_PDCP_SDU_16B1,
    crs_PDCP_SDU_16B2,
    crs_PDCP_SDU_16B3,
    crs_PDCP_SDU_16B4,
    crs_PDCP_SDU_16B5,
    crs_PDCP_SDU_16B6,
    crs_PDCP_SDU_16B7,
    crs_PDCP_SDU_16B8,
    crs_PDCP_SDU_16B9
  };

  template PDCP_SDUList_Type cr_PDCP_SDUList_10Def := cs_PDCP_SDUList_10Def; /* @status    APPROVED */


  template (value) MAC_PDUList_Type cs_MAC_PDUList_1 (template (value) MAC_PDU_Type p_MAC_PDU) :=
  { /* @status    APPROVED */
    p_MAC_PDU
  };

  template MAC_PDUList_Type cr_MAC_PDUList_1 (template (present) MAC_PDU_Type p_MAC_PDU) :=
  { /* @status    APPROVED */
    p_MAC_PDU
  };

  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_TA :=
  { /* @status    APPROVED */
    Reserved := tsc_B2_Reserved,       /* Reserved bits */
    Extension := tsc_ExtensionNoMoreHeaders,
    LCID := tsc_LchId_TA,
    Length := omit
  };

  template (value) MAC_PDU_SubHeader_Type cds_MAC_PDU_SubHeader_TA_MoreHeaders modifies cs_MAC_PDU_SubHeader_TA :=
  { /* @status    APPROVED */
    Extension          := tsc_ExtensionMoreHeaders
  };

  template (value) MAC_CTRL_ElementList_Type cs_CTRL_Elem_TA_0 :=
  { /* @status    APPROVED */
    ShortBSR               := omit,        /* UL only */
    LongBSR                := omit,        /* UL only */
    C_RNTI                 := omit,        /* UL only */
    // DRX command CTRL Elem is 0 bits length
    ContentionResolutionID := omit,        /* DL only */
    TimingAdvance          := '00011111'B, /* value of 31 36.213 clause 4.2.3 NTA,new = NTA,old + (TA-31)*16 results in  NTA,new = NTA,old*/
    PowerHeadRoom          := omit         /* UL only */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_TimingAdvance_0 :=
  { /* @status    APPROVED */
    Header                 := { cs_MAC_PDU_SubHeader_TA },      /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
    CtrlElementList        := cs_CTRL_Elem_TA_0,                /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList                := omit,     /* MAC SDUs, which can typically be RLC PDUs */
    Padding                := omit      /* Octet aligned Padding if more than or equal to 2 bytes */
  };

  template (value) RLC_AMD_Header_FixPart_Type cs_RLC_AMD_Header_FixPart(B1_Type p_Poll,
                                                                         B10_Type p_SN) :=
  { /* @status    APPROVED */
    D_C                    := tsc_D_C_DataPDU,                /* 1 ... Data PDU */
    ReSeg                  := '0'B,                           /* 0 ... AMD PDU */
    Poll                   := p_Poll,
    FramingInfo            := tsc_Framing00,                  /* 2 bit FI */
    Extension              := tsc_ExtensionNoMoreHeaders,     /* 1 bit  E  */
    SN                     := p_SN                            /* Sequence numbers */
  };

  template (value) RLC_AMD_Header_FixPart_Type cds_RLC_AMD_Header_FixPart_MoreHeaders(B1_Type p_Poll,
                                                                                      B10_Type p_SN)
    modifies cs_RLC_AMD_Header_FixPart :=
  {
    Extension              := tsc_ExtensionMoreHeaders
  };

  template  RLC_AMD_Header_FixPart_Type cr_RLC_AMD_Header_FixPart(template (present) B1_Type p_Poll,
                                                                  template (present) B10_Type p_SN) :=
  { /* @status    APPROVED */
    D_C                    := tsc_D_C_DataPDU,                /* 1 ... Data PDU */
    ReSeg                  := '0'B,                           /* 0 ... AMD PDU */
    Poll                   := p_Poll,
    FramingInfo            := tsc_Framing00,                  /* 2 bit FI */
    Extension              := tsc_ExtensionNoMoreHeaders,     /* 1 bit  E  */
    SN                     := p_SN                            /* Sequence numbers */
  };

  template (value) RLC_AMD_Header_Type cs_RLC_AMD_Header_1SDU(B1_Type p_Poll,
                                                              B10_Type p_SN) :=
  { /* @status    APPROVED */
    FixPart     := cs_RLC_AMD_Header_FixPart(p_Poll,p_SN),
    SegmentPart := omit,
    FlexPart    := omit
  };

  template  RLC_AMD_Header_Type cr_RLC_AMD_Header_1SDU(template (present) B1_Type p_Poll,
                                                       template (present) B10_Type p_SN) :=
  { /* @status    APPROVED */
    FixPart     := cr_RLC_AMD_Header_FixPart(p_Poll,p_SN),
    SegmentPart := omit,
    FlexPart    := omit
  };

  template (value) RLC_PDU_Type cs_RLC_AMD_1PDU(B1_Type p_Poll,
                                                B10_Type p_SN,
                                                RLC_DataField_Type p_RLC_SDU) :=
  { /* @status    APPROVED */
    AMD   := {
      Header  := cs_RLC_AMD_Header_1SDU(p_Poll,p_SN),
      Data    := {p_RLC_SDU}
    }
  };

  template (value) RLC_PDU_Type cs_RLC_UMD_1PDU( integer p_SN,
                                                 RLC_DataField_Type p_RLC_SDU) :=
  {
    UMD   := cs_UMD_PDUoneSDU_SN10( p_SN, {p_RLC_SDU} )
  };

  template RLC_PDU_Type cr_RLC_AMD_1PDU(template (present) B1_Type p_Poll,
                                        template (present) B10_Type p_SN,
                                        template (present) RLC_DataField_Type p_RLC_SDU) :=
  { /* @status    APPROVED */
    AMD := {
      Header  := cr_RLC_AMD_Header_1SDU(p_Poll, p_SN),
      Data    := {p_RLC_SDU}
    }
  };

  template RLC_PDU_Type cr_RLC_Status_1PDU(integer p_ACK_SN) :=
  { /* @status    APPROVED */
    Status   := cr_RLC_AM_StatusPDU_ACK_SN(p_ACK_SN)
  };

  template (value) RLC_PDU_Type cs_RLC_Status_1PDU(integer p_ACK_SN) :=
  { /* @status    APPROVED */
    Status   := cs_RLC_AM_StatusPDU_ACK_SN(p_ACK_SN)
  };

  template RLC_PDUList_Type cr_RLC_PDUList_1 (template (present) RLC_PDU_Type p_RLC_PDU_Type) :=
  {
    p_RLC_PDU_Type
  };

  template (value) MAC_PDU_Length_Type cs_MAC_PDU_Length_7Bit(integer p_Length) :=
  { /* @status    APPROVED */
    Format := '0'B, // 7 bit Length
    Value := int2bit (p_Length,7)
  };

  template  MAC_PDU_Length_Type cr_MAC_PDU_LengthAny_7Bit:=
  {
    Format := '0'B, // 7 bit Length
    Value := '???????'B
  };

  template  MAC_PDU_Length_Type cr_MAC_PDU_Length_7Bit (B7_Type p_Length):=
  { /* @status    APPROVED */
    Format := '0'B, // 7 bit Length
    Value := p_Length
  };

  template  MAC_PDU_Length_Type cr_MAC_PDU_Length_15Bit (B15_Type p_Length):=
  { /* @status    APPROVED */
    Format := '1'B, // 7 bit Length
    Value := p_Length
  };

  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_1SDU(integer p_Length) :=
  {
    Reserved  := tsc_B2_Reserved,   /* Reserved bits */
    Extension := tsc_ExtensionNoMoreHeaders,
    LCID      := tsc_LchId_DRB1,
    Length    := cs_MAC_PDU_Length_7Bit(p_Length)
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_1RLCPDU_TA0_NoPad(B5_Type p_LchId,
                                                             MAC_SDU_Type p_MAC_SDU) :=
  { /* @status    APPROVED */
    Header      := { cds_MAC_PDU_SubHeader_TA_MoreHeaders,
                     cs_MAC_PDU_SubHeader_SDU_LCID_NoLength(p_LchId)},  /* list of MAC PDU SubHeaders corresponding to
                                                                         * MAC control elements and MAC SDUs */
    CtrlElementList := cs_CTRL_Elem_TA_0,                               /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                         * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},                                     /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit  //no padding to be performed
  };

  template (value) MAC_PDU_Length_Type cs_MAC_PDU_Length_15Bit(integer p_Length) :=
  { /* @status    APPROVED */
    Format := '1'B,                                 // 15 bit Length
    Value  := int2bit (p_Length,15)
  };


  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_PaddingSubHeader :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := tsc_LchId_Padding,
    Length     := omit
  };

  template (value) MAC_PDU_SubHeader_Type cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders modifies cs_MAC_PDU_PaddingSubHeader :=
  { /* @status    APPROVED */
    Extension          := tsc_ExtensionMoreHeaders
  };

  template MAC_PDU_SubHeader_Type cr_MAC_PDU_PaddingSubHeader := cs_MAC_PDU_PaddingSubHeader;   /* @status    APPROVED */

  template MAC_PDU_SubHeader_Type cr_MAC_PDU_PaddingSubHeader_MoreSubHeaders := cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders;   /* @status    APPROVED */

  //The same as cs_MAC_PDU_SubHeader_1SDU
  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_Short_SDU(B5_Type p_LchId,
                                                                         integer p_Length) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := cs_MAC_PDU_Length_7Bit(p_Length)
  };

  template MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_Short_SDU :=
  {
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := tsc_LchId_DRB1,
    Length     := cr_MAC_PDU_LengthAny_7Bit
  };

  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_Short_SDU_LCID(integer p_Length,
                                                                              B5_Type p_LchId) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := cs_MAC_PDU_Length_7Bit(p_Length)
  };

  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_SDU_LCID_NoLength(B5_Type p_LchId) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := omit
  };

  template  MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_Short_SDU_LCID_AnyLength(B5_Type p_LchId) :=
  {
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := cr_MAC_PDU_LengthAny_7Bit
  };

  template  MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_Short_SDU_LCID_Length(B5_Type p_LchId,
                                                                              B7_Type p_Length) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := cr_MAC_PDU_Length_7Bit (p_Length)
  };

  template  MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_Long_SDU_LCID_Length(B5_Type p_LchId,
                                                                             B15_Type p_Length) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := cr_MAC_PDU_Length_15Bit (p_Length)
  };
 
  template  MAC_PDU_SubHeader_Type cdr_MAC_PDU_SubHeader_Long_SDU_LCID_Length_MoreHeaders(B5_Type p_LchId,
                                                                             B15_Type p_Length)
        modifies cr_MAC_PDU_SubHeader_Long_SDU_LCID_Length:=
  { /* @status    APPROVED */
    
    Extension  := tsc_ExtensionMoreHeaders
  };
  template  MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_SDU_LCID_NoLength(B5_Type p_LchId) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := omit
  };
  template  MAC_PDU_SubHeader_Type cr_MAC_PDU_SubHeader_SDU_LCID(B5_Type p_LchId) :=
  { /* @status     */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := omit
  };
  template  MAC_PDU_SubHeader_Type cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(B5_Type p_LchId,
                                                                                              B7_Type p_Length)
  modifies cr_MAC_PDU_SubHeader_Short_SDU_LCID_Length :=
  { /* @status    APPROVED */
    Extension  := tsc_ExtensionMoreHeaders
  };


  template (value) MAC_PDU_SubHeader_Type cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(integer p_Length,
                                                                                           B5_Type p_LchId)
    modifies cs_MAC_PDU_SubHeader_Short_SDU_LCID :=
  { /* @status    APPROVED */
    Extension := tsc_ExtensionMoreHeaders
  };

  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_Large_SDU(integer p_Length,
                                                                         B5_Type p_LchId) :=
  { /* @status    APPROVED */
    Reserved   := tsc_B2_Reserved,       /* Reserved bits */
    Extension  := tsc_ExtensionNoMoreHeaders,
    LCID       := p_LchId,
    Length     := cs_MAC_PDU_Length_15Bit(p_Length)
  };

  template (value) MAC_PDU_SubHeader_Type cds_MAC_PDU_SubHeader_Large_SDU_MoreHeaders(integer p_Length,
                                                                                      B5_Type p_LchId)
    modifies cs_MAC_PDU_SubHeader_Large_SDU :=
  { /* @status    APPROVED */
    Extension          := tsc_ExtensionMoreHeaders
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_1SubHeader_Padding_Large(B5_Type p_LCh_Id,
                                                                    template (value) PDCP_SDU_Type p_Padding,
                                                                    MAC_SDU_Type p_MAC_SDU ) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cds_MAC_PDU_SubHeader_Large_SDU_MoreHeaders(lengthof (p_MAC_SDU), p_LCh_Id),
      cs_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList := omit,                                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},                             /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  p_Padding                               /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_2RLCPDU_ShortSubHeaders (B5_Type p_LCh_Id1,
                                                                    B5_Type p_LCh_Id2,
                                                                    MAC_SDU_Type p_MAC_SDU1,
                                                                    MAC_SDU_Type p_MAC_SDU2) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU1), p_LCh_Id1),
      cs_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LCh_Id2)
    },
    CtrlElementList := omit,                                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {                                                /* MAC SDUs, which can typically be RLC PDUs */
      p_MAC_SDU1,
      p_MAC_SDU2
    },
    Padding         := omit                    /* padding bytes apart from the last subheader byte */
  };

  template MAC_PDU_Type cr_MAC_PDU_2RLCPDU_ShortSubHeaders(B5_Type p_LCh_Id1,
                                                           B5_Type p_LCh_Id2,
                                                           B7_Type p_Length1,
                                                           template (present) MAC_SDU_Type p_MAC_SDU1,
                                                           template (present) MAC_SDU_Type p_MAC_SDU2 ) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cdr_MAC_PDU_SubHeader_Short_SDU_LCID_Length_MoreSubHeaders(p_LCh_Id1, p_Length1),
      cr_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LCh_Id2)
    },
    CtrlElementList := omit,                                           /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                        * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {                                                       /* MAC SDUs, which can typically be RLC PDUs */
      p_MAC_SDU1,
      p_MAC_SDU2
    },
    Padding         := omit                    /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_2RLCPDU_1Padding_ShortSubHeaders(B5_Type p_LCh_Id1,
                                                                            B5_Type p_LCh_Id2,
                                                                            MAC_SDU_Type p_MAC_SDU1,
                                                                            MAC_SDU_Type p_MAC_SDU2) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU1), p_LCh_Id1),
      cs_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LCh_Id2)

    },
    CtrlElementList := omit,                                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {                                                /* MAC SDUs, which can typically be RLC PDUs */
      p_MAC_SDU1,
      p_MAC_SDU2
    },
    Padding         := omit                    /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_SubHeader_Type cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders(B5_Type p_LchId,
                                                                                      integer p_Length)
    modifies cs_MAC_PDU_SubHeader_Short_SDU :=
  { /* @status    APPROVED */
    Extension := tsc_ExtensionMoreHeaders
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_NoPadding_RLCPDU_Step7(B5_Type p_LCh_Id,
                                                                  MAC_SDU_Type p_MAC_SDU1,
                                                                  MAC_SDU_Type p_MAC_SDU2,
                                                                  MAC_SDU_Type p_MAC_SDU3,
                                                                  MAC_SDU_Type p_MAC_SDU4,
                                                                  MAC_SDU_Type p_MAC_SDU5,
                                                                  MAC_SDU_Type p_MAC_SDU6 ) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cds_MAC_PDU_SubHeader_Large_SDU_MoreHeaders(lengthof (p_MAC_SDU1), p_LCh_Id ),
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU2), p_LCh_Id ),
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU3), p_LCh_Id ),
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU4), p_LCh_Id ),
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders_LCID(lengthof (p_MAC_SDU5), p_LCh_Id ),
      cs_MAC_PDU_SubHeader_SDU_LCID_NoLength( p_LCh_Id )
    },
    CtrlElementList := omit,                                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList := {                                                /* MAC SDUs, which can typically be RLC PDUs */
      p_MAC_SDU1,
      p_MAC_SDU2,
      p_MAC_SDU3,
      p_MAC_SDU4,
      p_MAC_SDU5,
      p_MAC_SDU6
    },
    Padding         := omit                    /* padding bytes apart from the last subheader byte */
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_1SubHeader_Padding_RLCPDU_Short (template (value) PDCP_SDU_Type p_Padding,
                                                                            B5_Type p_LCh_Id,
                                                                            MAC_SDU_Type p_MAC_SDU ) :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cds_MAC_PDU_SubHeader_Short_SDU_MoreHeaders(p_LCh_Id, lengthof (p_MAC_SDU)),
      cs_MAC_PDU_PaddingSubHeader
    },
    CtrlElementList := omit,                                    /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := {p_MAC_SDU},                             /* MAC SDUs, which can typically be RLC PDUs */
    Padding         :=  p_Padding               //padding bytes apart from the last subheader byte
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_TimingAdvance_1Padding :=
  { /* @status    APPROVED */
    Header := {                                                 /* list of MAC PDU SubHeaders corresponding to
                                                                 * MAC control elements and MAC SDUs */
      cds_MAC_PDU_PaddingSubHeader_MoreSubHeaders,
      cs_MAC_PDU_SubHeader_TA

    },
    CtrlElementList := cs_CTRL_Elem_TA_0,                       /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList         := omit, /* MAC SDUs, which can typically be RLC PDUs */
    Padding         := omit  /* Octet aligned Padding if more than or equal to 2 bytes */
  };

  }// End of group DRB_Templates

  group SysInfo_Templates {

  template (value) RACH_ConfigCommon.preambleInfo.preamblesGroupAConfig cs_PreamblesGroupAConfig(RACH_ConfigCommon.preambleInfo.preamblesGroupAConfig.messageSizeGroupA p_MessageSizeGroupA) :=
  { /* @status    APPROVED */
    sizeOfRA_PreamblesGroupA := n28,
    messageSizeGroupA        := p_MessageSizeGroupA,
    messagePowerOffsetGroupB := minusinfinity
  };
  } // end of group SysInfo_Templates

  group PRACH_Preamble_Templates {

  template RachPreamble_Type cr_PRACH_Preamble_IND_Rapid0_27 :=
  { /* @status    APPROVED */
    RAPID        := (0..27),
    PRTPower     := ?
  };

  template RachPreamble_Type cr_PRACH_Preamble_IND_Rapid28_51 :=
  { /* @status    APPROVED */
    RAPID        := (28..51),
    PRTPower     := ?
  };

  } // end of group PRACH_Preamble_Templates

  group PDCCH_Order{

  template SYSTEM_CTRL_CNF car_SYSTEM_CTRL_L1_TestMode_CNF(CellId_Type p_CellId) :=
  { /* @status    APPROVED */
    Common := cr_CnfAspCommonPart_CellCfg(p_CellId),
    Confirm := {
      L1_TestMode := true
    }
  };

  template SYSTEM_CTRL_CNF car_SYSTEM_CTRL_SPS_Config_CNF(CellId_Type p_CellId) :=
  {
    Common := cr_CnfAspCommonPart_CellCfg(p_CellId),
    Confirm := {
      Sps := true
    }
  };

  } // end of group PDCCH Order

  group GrantConfig {

  template (value) DciUlInfo_Type cs_DciInfo_CcchDcchDtchUL_Explicit_RV   (ImcsValue_Type  p_Imcs,
                                                                           integer p_Nprb,
                                                                           template (value) UL_TransRetransmissionList_Type p_TransRetransmissionList) :=
  {
    Imcs := {Value := p_Imcs},
    TransRetransmissionList := p_TransRetransmissionList,
    FreqDomainSchedul := cs_FreqDomainSchedulExplicit(0, p_Nprb)          // FFS
  };
  template (value) SYSTEM_CTRL_REQ cas_ULHoppingGrantAllocation_REQ(CellId_Type   p_CellId,
                                                           template (value) TimingInfo_Type p_TimingInfo,
                                                           template (omit) DciUlInfo_Type p_DciUlInfo,
                                                           template (omit)  PUCCH_Synch_Type p_PUCCH_Synch,
                                                           template (value) UL_GrantConfig_Type p_UL_GrantConfig,
                                                           template (value) PucchHoppingBits_Type p_PucchHoppingBits) :=
{ /* @desc      common template to be used in all UL Hoping grant configurations */
  /* @status     */
  Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
  Request := {
    Cell := {
      AddOrReconfigure := {
        Basic := omit,
        Active := {
          C_RNTI := omit,
          PhysicalLayerConfigUL := omit,
          RachProcedureConfig := omit,
          CcchDcchDtchConfig := {
            TimeDomainRestriction := omit,
            DL := omit,

            UL := {
              DciInfo := p_DciUlInfo,
              Hopping := {
                Activated := {
                    PucchHopping :=p_PucchHoppingBits
                }

              },
              PUCCH_Synch  := p_PUCCH_Synch,
              UL_GrantConfig  := p_UL_GrantConfig
            },
            DrxCtrl := omit,
            TtiBundling := omit
          }
        }
      }
    }
  }
};
template (value) PucchHoppingBits_Type cs_PucchHoppingBits_OneBit (B1_Type p_B1) :={
    OneBit  := p_B1
  };
template (value) PucchHoppingBits_Type cs_PucchHoppingBits_TwoBit (B2_Type p_B2) :={
    TwoBits  := p_B2
  };
  } // end of group GrantConfig

  group SPS_Templates {

  template (value) SYSTEM_CTRL_REQ cas_SPS_Activate_REQ(CellId_Type p_CellId,
                                                        template (value) TimingInfo_Type p_TimingInfo,
                                                        template (value) SpsActivateInfo_Type p_SpsInfo) :=
  {
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Sps := {
        Activate := p_SpsInfo
      }
    }
  };

  template (value) SYSTEM_CTRL_REQ cas_SPS_PDCCH_ExplicitRelease_REQ(CellId_Type p_CellId,
                                                                     template (value) TimingInfo_Type p_TimingInfo,
                                                                     template (value) C_RNTI p_SPS_CRNTI,
                                                                     template (value) PdcchDciFormat_Type p_DCI_Format) :=
  {
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Sps := {
        Deactivate :=
        {
          PdcchExplicitRelease :=
          {
            SPS_C_RNTI := p_SPS_CRNTI,
            DCI_Format := p_DCI_Format
          }
        }
      }
    }
  };

  template (value) SYSTEM_CTRL_REQ cas_SPS_Deactivate_REQ(CellId_Type p_CellId,
                                                          template (value) TimingInfo_Type p_TimingInfo) :=
  {
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Sps := {
        Deactivate := {LocalRelease := true}
      }
    }
  };

  template (value) SpsActivateInfo_Type cs_DL_SPSInfo( template (value) C_RNTI p_SPS_C_RNTI,
                                                       template (value) SpsAssignmentDL_Type p_SpsAssignmentDL) :=
  {
    SPS_C_RNTI            := p_SPS_C_RNTI,                     /* Note: it seems to be an open issue how the UE gets the SPS C-RNTI (summer '08) */
    UplinkGrant           := omit,
    DownlinkAssignment    := p_SpsAssignmentDL
  };

  template (value) SpsActivateInfo_Type cs_UL_SPSInfo( template (value) C_RNTI p_C_RNTI,
                                                       template (value) SpsAssignmentUL_Type p_SpsAssignmentUL) :=
  {
    SPS_C_RNTI            := p_C_RNTI,                     /* Note: it seems to be an open issue how the UE gets the SPS C-RNTI (summer '08) */
    UplinkGrant           := p_SpsAssignmentUL,
    DownlinkAssignment    := omit
  };

  template (value) SpsAssignmentDL_Type cs_SpsAssignmentDL ( template (value) DciDlInfo_Type p_DciDlInfo,
                                                             template (value) SpsConfigDL_Type p_SpsConfigDL,
                                                             template (omit)  Null_Type p_SetNDI_1 := omit) :=
  {
    DciInfo            := p_DciDlInfo, /* to apply a assignment */
    SchedulInterval    := cs_SpsConfigurationDL_r8(p_SpsConfigDL), /* as in 36.331 cl. 6.3.2 SPS-ConfigurationDL */
    SetNDI_1           := p_SetNDI_1
  };

  template (value) SpsAssignmentUL_Type cs_SpsAssignmentUL ( template (value) DciUlInfo_Type p_DciUlInfo,
                                                             template (value) SpsConfigUL_Type p_SpsConfigUL,
                                                             template (omit)  Null_Type p_SetNDI_1 := omit) :=
  {
    DciInfo            := p_DciUlInfo, /* to apply a grant */
    SchedulInterval    := cs_SpsConfigurationUL_r8(p_SpsConfigUL),  /* as in 36.331 cl. 6.3.2 SPS-ConfigurationUL */
    SetNDI_1           := p_SetNDI_1
  };

  template (value) SpsConfigDL_Type cs_SpsConfigDL_FDD  :=
  {
    semiPersistSchedIntervalDL := sf160,
    numberOfConfSPS_Processes := 8,
    n1_PUCCH_AN_PersistentList := {0}
  };

  template (value) SpsConfigDL_Type cds_SpsConfigDL_TDD  modifies cs_SpsConfigDL_FDD :=
  {
    numberOfConfSPS_Processes := 7
  };

  template (value) SpsConfigUL_Type cs_SpsConfigUL_FDD  :=
  {
    semiPersistSchedIntervalUL := sf160,
    implicitReleaseAfter := e2,
    p0_Persistent := omit,
    twoIntervalsConfig := omit
  };
  //CR R5-094628
  template (value) SpsConfigUL_Type cds_SpsConfigUL_TDD modifies cs_SpsConfigUL_FDD :=
  {
    twoIntervalsConfig := true_
  };

  template (value) DciDlInfo_Type  cs_DciDLInfo_Explicit (template (value)DciDlInfoExplicit_Type p_DciDlInfoExplicit) :={
    Explicit        := p_DciDlInfoExplicit
  };
//======================================================================

  template (value) DciDlInfoExplicit_Type cs_DciDlInfoExplicit(ImcsValue_Type p_Imcs,  //MCS index of table 8.6.1-1 of 36.213
                                                               PdcchDciFormat_Type p_Format,
                                                               PdcchResourceAllocation_Type p_ResourceAllocType,
                                                               integer p_Nprb,         //number of resource blocks to be assigned
                                                               integer p_FirstRbIndex := 0, //index of first resource block, defualt =0
                                                               //@sic R5-104710 new parameter added sic@
                                                               template (value) RedundancyVersionListDL_Type p_RedundancyVersionList := cs_RedundancyVersionListDL_Def) :=
  { /* @status    APPROVED */
    Imcs_1stCW := {Value := p_Imcs},
    Imcs_2ndCW := {NotUsed := true},
    Format := p_Format,
    ResourceAllocType := p_ResourceAllocType,
    FreqDomainSchedul := cs_FreqDomainSchedulExplicit(p_FirstRbIndex, p_Nprb),   //index of the first resource block in frequency domain set to 0
    RedundancyVersionList := p_RedundancyVersionList,
    MimoInfo := omit                                                // @sic R5-104109, R5w100215 sic@
  };
  template (value) SYSTEM_CTRL_REQ cas_DL_DCI_ExplicitConfig_REQ(CellId_Type p_CellId,
                                                            template (value) TimingInfo_Type p_TimingInfo,
                                                            ImcsValue_Type p_Imcs,
                                                            PdcchDciFormat_Type p_Format,
                                                            PdcchResourceAllocation_Type p_ResourceAllocType,
                                                            integer p_Nprb,
                                                            integer p_FirstRbIndex := 0 //index of first resource block, defualt =0
                                                            ) :=
  { /* @status    APPROVED
    //@sic R5-104710 changed the name of template and added start index as parameter sic@*/
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Cell := {
        AddOrReconfigure := {
          Basic := omit,
          Active := {
            C_RNTI := omit,
            PhysicalLayerConfigUL := omit,
            RachProcedureConfig := omit,
            CcchDcchDtchConfig := {
              TimeDomainRestriction := omit,
              DL := {
                DciInfo := {
                  Explicit := cs_DciDlInfoExplicit(p_Imcs, p_Format, p_ResourceAllocType, p_Nprb, p_FirstRbIndex)
                },
                AntennaInfo := omit,
                MimoInfo := omit,
                HarqProcessConfig := omit  /* @sic R5w100214, R5w100220 sic@ */
              },
              UL := omit,
              DrxCtrl := omit,
              TtiBundling := omit
            }
          }
        }
      }
    }
  };
 
  template (value) DciDlInfoExplicit_Type cs_DciDlInfoExplicit_DCI1_RA0 (ImcsValue_Type  p_Imcs,
                                                                         integer p_Nprb) :=
  {
    Imcs_1stCW := {Value := p_Imcs},
    Imcs_2ndCW := {NotUsed := true},
    Format           := dci_1,
    ResourceAllocType := ra_0,
    FreqDomainSchedul  := {
      FirstRbIndex  := 2 , // the First allowed UE -Dedicated RB
      Nprb        := p_Nprb
    },
    RedundancyVersionList := cs_RedundancyVersionListDL_Def,
    MimoInfo := omit                                                // @sic R5-104109, R5w100215 sic@
  };

  template (value) DL_SCH_CRC_Type cs_DL_SCH_CRC_SPS_C_RNTI_Error(MAC_Test_DL_SCH_CRC_Mode_Type p_CRC_Mode) :=
  {
    SPS_RNTI := p_CRC_Mode
  };

  /*template (value) RadioResourceConfigDedicated cs_RadioResourceConfigDedicated_SPS ( template (value) SPS_Config p_SPS_Config ) := {
   //Values according to 36.508 cl. 4.6.3 Table 4.6.3-16 (using condition n=1 & m=0)
    srb_ToAddModList := omit,
    drb_ToAddModList := omit,
    drb_ToReleaseList := omit,
    mac_MainConfig := omit,
    sps_Config := p_SPS_Config,
    physicalConfigDedicated := omit
  };*/

  template (value) SPS_Config  cs_SPS_Config_DL (template (omit) C_RNTI p_C_RNTI,
                                                 template (value) SPS_ConfigDL  p_SPS_ConfigDL) :=
  {
    semiPersistSchedC_RNTI := p_C_RNTI,
    sps_ConfigDL       := p_SPS_ConfigDL,
    sps_ConfigUL       := omit
  };

  template (value) SPS_Config  cs_SPS_Config_UL (template (omit) C_RNTI p_C_RNTI,
                                                  template (value) SPS_ConfigUL  p_SPS_ConfigUL) :=
  {
    semiPersistSchedC_RNTI := p_C_RNTI,
    sps_ConfigDL       := omit,
    sps_ConfigUL       := p_SPS_ConfigUL
  };

  template (value) SPS_ConfigDL cs_SPS_ConfigDL_Setup (template (value) SpsConfigDL_Type p_SpsConfigDL) :=
  {
    setup := p_SpsConfigDL
  };

  template (value) SPS_ConfigDL cs_SPS_ConfigDL_Release  :=
  {
    release := NULL
  };

  template (value) SPS_ConfigUL cs_SPS_ConfigUL_Setup (template (value) SpsConfigUL_Type p_SpsConfigUL) :=
  {
    setup := p_SpsConfigUL
  };

  template (value) SPS_ConfigUL cs_SPS_ConfigUL_Release  :=
  {
    release := NULL
  };

  } // end of SPS_Templates

  group DRX_Templates {
  template (value) MAC_MainConfig cs_MAC_MainConfig_RBC_DrxL( integer p_CycleStartOffset ) :=
  { /* @status    APPROVED */
    ul_SCH_Config := cs_UL_SCH_Config_DisableBSR,
    drx_Config := {
      setup := {
        onDurationTimer := psf20,
        drx_InactivityTimer := psf6,
        drx_RetransmissionTimer := psf6,
        longDRX_CycleStartOffset := {
          sf640 := p_CycleStartOffset
        },
        shortDRX := omit
      }
    },
    timeAlignmentTimerDedicated := infinity_,
    phr_Config := {
      release := NULL
    }
  };

  template (value) MAC_PDU_Type cs_MAC_PDU_DRX_Command_1Padding :=
  { /* @status    APPROVED */
    Header := {         /* list of MAC PDU SubHeaders corresponding to
                         * MAC control elements and MAC SDUs */
      cs_MAC_PDU_PaddingSubHeader,
      cs_MAC_PDU_SubHeader_DRX
    },
    CtrlElementList        := omit,                             /* Mac control elements; acc. to 36.321 cl. 6.1.2
                                                                 * "MAC control elements, are always placed before any MAC SDU." */
    SduList                := omit,     /* MAC SDUs, which can typically be RLC PDUs */
    Padding                := omit      /* Octet aligned Padding if more than or equal to 2 bytes */
  };

  template (value) MAC_PDU_SubHeader_Type cs_MAC_PDU_SubHeader_DRX :=
  { /* @status    APPROVED */
    Reserved := tsc_B2_Reserved,       /* Reserved bits */
    Extension := tsc_ExtensionNoMoreHeaders,
    LCID := tsc_LchId_DRX,
    Length := omit
  };

  template (value) SYSTEM_CTRL_REQ cas_DciDlInfoCommon_Config(CellId_Type p_CellId,
                                                              template (value) TimingInfo_Type p_TimingInfo,
                                                              template (value) DciDlInfoCommon_Type p_DciDlInfoCommon) :=
  { /* @status    APPROVED */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Cell := {
        AddOrReconfigure := {
          Basic := omit,
          Active := {
            C_RNTI := omit,
            PhysicalLayerConfigUL := omit,
            RachProcedureConfig := omit,
            CcchDcchDtchConfig := {
              TimeDomainRestriction := omit,
              DL := {
                DciInfo := {
                  Auto := p_DciDlInfoCommon
                },
                AntennaInfo := omit,
                MimoInfo := omit,
                HarqProcessConfig := omit  /* @sic R5w100214, R5w100220 sic@ */
              },
              UL := omit,
              DrxCtrl := omit,
              TtiBundling := omit
            }
          }
        }
      }
    }
  };

  } // end of DRX_Templates


  group TTI_Bundle {

  template (value) MAC_MainConfig cds_MAC_MainConfig_7_1_4_14 (template (value) DRX_Config p_DRX_Config)
    modifies cs_508_MAC_MainConfig_RBC :=
  { /* Default values according to 36.508 cl. 4.8.2.1.5 Table 4.8.2.1.5-1 (using condition DRX_L) */
    ul_SCH_Config := {
      maxHARQ_Tx := n28,
      periodicBSR_Timer := sf20,
      retxBSR_Timer := sf1280,
      ttiBundling := true
    }
  };

  template (value) MAC_MainConfig_Type cs_MAC_MainConfig_Explicit_7_1_4_14 :=
  {
    explicitValue := cds_MAC_MainConfig_7_1_4_14(cs_508_DRX_Config_DrxL)
  };

  template (value) RadioResourceConfigDedicated cs_RadioResourceConfigDedicated_MAC ( template (omit) MAC_MainConfig_Type p_MAC_MainConfig,
                                                                                      template (omit)  SPS_Config p_SPS_Config,
                                                                                      template (omit) PhysicalConfigDedicated p_PhysicalConfigDedicated ) :=
  { /* Values according to 36.508 cl. 4.6.3 Table 4.6.3-16 (using condition n=1 & m=0) */
    /* @status    APPROVED */
    srb_ToAddModList := omit,
    drb_ToAddModList := omit,
    drb_ToReleaseList := omit,
    mac_MainConfig := p_MAC_MainConfig,
    sps_Config := p_SPS_Config,
    physicalConfigDedicated := p_PhysicalConfigDedicated
  };

  template (value) SYSTEM_CTRL_REQ cas_CellConfig_UpdateMAC_MainConfig_REQ(CellId_Type  p_CellId,
                                                                           template (value) TimingInfo_Type p_TimingInfo,
                                                                           PRACH_ConfigSIB p_PRACH_ConfigSIB) :=
  {
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Cell := {
        AddOrReconfigure := {
          Basic := omit,
          Active := {
            C_RNTI := omit,
            PhysicalLayerConfigUL := {
              Prach := cs_PRACH_Config_r8(cs_PRACH_Config_Def(p_PRACH_ConfigSIB)),
              Pucch := omit,
              Pusch := omit,
              TimingAdvance := omit,
              SRS_UL_Config := omit,
              SR_Config := omit,
              CQI_ReportConfig := omit,
              UplinkPowerControlCommon := omit,
              UplinkPowerControlDedicated := omit
            },
            RachProcedureConfig := omit,
            CcchDcchDtchConfig := omit
          }
        }
      }
    }
  };

  template (value) PhysicalConfigDedicated cs_PhysicalConfigDedicated_DSR_Transmax (SR_PUCCH_ResourceIndex_Type p_SR_PUCCH_ResourceIndex,
                                                                                    SR_ConfigIndex_Type p_SR_ConfigIndex ,
                                                                                    Dsr_TransMax_Type p_Dsr_TransMax := n64) :=  // @sic R5-102177 sic@
  { /* Defaule values according to 36.508 cl. 4.8.2.1.6 Table 4.8.2.1.6-1 */
    pdsch_ConfigDedicated := omit,
    pucch_ConfigDedicated := omit,
    pusch_ConfigDedicated := omit,
    uplinkPowerControlDedicated := omit,
    tpc_PDCCH_ConfigPUCCH := omit,
    tpc_PDCCH_ConfigPUSCH := omit,
    cqi_ReportConfig := omit,
    soundingRS_UL_ConfigDedicated := omit,
    antennaInfo := omit,
    schedulingRequestConfig := cs_508_SchedulingRequest_Config_Default (p_SR_PUCCH_ResourceIndex, p_SR_ConfigIndex, p_Dsr_TransMax)
  };

  template (value) SYSTEM_CTRL_REQ cas_TTI_Bundle_REQ(CellId_Type p_CellId,
                                                      template (value) TimingInfo_Type p_TimingInfo,
                                                      boolean p_TTI_Bundle,
                                                      Dl_Bandwidth_Type p_Dl_Bandwidth, // @sic R5-103846 sic@
                                                      Combination_Type    p_Combination) :=// @sic R5-103846 sic@
  {
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Cell := {
        AddOrReconfigure := {
          Basic := omit,
          Active := {
            C_RNTI :=omit,
            PhysicalLayerConfigUL :=omit,
            RachProcedureConfig :=omit,
            CcchDcchDtchConfig := {
              TimeDomainRestriction := omit,
              DL := {
                DciInfo := { Auto := cs_DciInfo_CcchDcchDtchDL(p_Dl_Bandwidth,p_Combination)},
                AntennaInfo := omit,
                MimoInfo := omit,
                HarqProcessConfig := omit  /* @sic R5w100214, R5w100220 sic@ */
              },
              UL := omit,
              DrxCtrl := omit,
              TtiBundling := cs_TTI_BundlingConfig_r8(p_TTI_Bundle)
            }
          }
        }
      }
    }
  };
  }// end of group TTI_Bundle

  group PDSCH_PwrCntrl {
  template (value) ToRS_EPRE_Ratios_Type cs_PowerRatiosPDSCH_TBS_Test :=
  { /* @sic R5-100263 */
    /* @status    APPROVED */
    RA := 0,
    RB := 0
  };
  template (value) PhysicalConfigDedicated cds_PhysicalConfigDedicated_TBS_Test( template (omit) CQI_ReportPeriodic p_CQI_ReportingPeriodic,
                                                                                 template (omit) SoundingRS_UL_ConfigDedicated p_SoundingRsUl_ConfigDedicated,
                                                                                 template (value) PhysicalConfigDedicated_AntennaInfo_Type p_AntennaInfo
                                                                                 )
    modifies cs_508_PhysicalConfigDedicated_Default_RBC :=
  { /* @status    APPROVED */
    pdsch_ConfigDedicated := cs_PDSCH_ConfigDedicated_TBS_Test
  };
  
  template (value) PDSCH_ConfigDedicated cs_PDSCH_ConfigDedicated_TBS_Test :=
  { /* @status    APPROVED */
    p_a := dB0
  };

  template (value) SYSTEM_CTRL_REQ cas_CellModify_REQ_PDSCH_Pwr_Ratio_TBS_Test(CellId_Type                      p_CellId,
                                                                               template (value) TimingInfo_Type p_TimingInfo ) :=
  {  /* @status    APPROVED */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Cell := {
        AddOrReconfigure := {
          Basic := {
            ConfigCapability := omit,//same as previous config
            StaticCellInfo := omit,//same as previous config
            PhysicalLayerConfigDL := cs_PhysicalLayerConfigDL_PDSCH_Pwr_Ratio_TBS_Test,
            InitialCellPower := omit,//same as previous config
            BcchConfig := omit,//same as previous config
            PcchConfig := omit//same as previous config
          },
          Active := omit//same as previous config
        }
      }
    }
  };
  template (value) PhysicalLayerConfigDL_Type cs_PhysicalLayerConfigDL_PDSCH_Pwr_Ratio_TBS_Test :=
  { /* @status    APPROVED */
    AntennaGroup := omit,   //same as previous config
    Pbch := omit, //same as previous config
    Pcfich := omit,//same as previous config
    Phich := omit,//same as previous config
    Pdcch := omit,//same as previous config
    Pdsch := {
      RelativeTxPower := {    // Acc. 36.508 Table 6.2.1.2-1
        RachResponse := cs_PowerRatiosPDSCH_TBS_Test,
        BcchOnPdsch := cs_PowerRatiosPDSCH_TBS_Test,
        PcchOnPdsch := cs_PowerRatiosPDSCH_TBS_Test,
        CcchDcchDtch := cs_PowerRatiosPDSCH_TBS_Test
      }
    },
    Pss := omit,//same as previous config
    Sss := omit//same as previous config
  };



  } // end of group PDSCH_PwrCntrl
  
  group AllowedHARQPRocess {
 
  template (value) SYSTEM_CTRL_REQ cas_DLHARQProcess_Config(CellId_Type p_CellId,
                                                              template (value) TimingInfo_Type p_TimingInfo,
                                                              template (value) HarqProcessConfigDL_Type  p_HarqProcessConfigDL) :=
  { /* @status     */
    Common := cs_ReqAspCommonPart_CellCfg(p_CellId, p_TimingInfo),
    Request := {
      Cell := {
        AddOrReconfigure := {
          Basic := omit,
          Active := {
            C_RNTI := omit,
            PhysicalLayerConfigUL := omit,
            RachProcedureConfig := omit,
            CcchDcchDtchConfig := {
              TimeDomainRestriction := omit,
              DL := {
                DciInfo := omit,
                AntennaInfo := omit,
                MimoInfo := omit,
                HarqProcessConfig := p_HarqProcessConfigDL  /* @sic R5w100214, R5w100220 sic@ */
              },
              UL := omit,
              DrxCtrl := omit,
              TtiBundling := omit
            }
          }
        }
      }
    }
  };
  template (value) HarqProcessConfigDL_Type cs_HarqProcessConfigDL_All  :=
  {
      AllProcesses := true

  };
  template (value) HarqProcessConfigDL_Type cs_HarqProcessConfigDL_Subset (template (value) HarqProcessList_Type p_HarqProcessList) :=
  {
      SpecificSubset := p_HarqProcessList

  };
  template (value) HarqProcessList_Type cs_HarqProcessList_012 := {
      0,1,2
  } // only harq process 0,1,2 are selected to meet the TDD configuration 0, which has lowest HARQ process 4
  }//end of group AllowedHARQPRocess

}
