46 #define VXLIB_COUNT_LIMIT 512
54 template <u
int32_t dTypeIn, u
int32_t dTypeOut>
58 printf(
"Enter VXLIB_tableLookup_checkSrcIdx_init_ci\n");
63 __SE_TEMPLATE_v1 se0Params = __gen_SE_TEMPLATE_v1();
68 size_t width = pKerPrivArgs->
width;
69 size_t height = pKerPrivArgs->
height;
71 typedef typename VXLIB_vec_type<dTypeIn>::type vec;
73 size_t elemCount = c7x::element_count_of<vec>::value;
74 uint32_t nTiles = (width + elemCount - 1) / elemCount;
76 uint32_t ICNT2 = (height + 1) / 2;
79 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
81 __SE_VECLEN SE_VECLEN = c7x::se_veclen<c7x::uint_vec>::value;
82 __SE_ELETYPE SE_ELETYPE = c7x::se_eletype<vec>::value;
85 se0Params.ICNT0 = width;
86 se0Params.DIM1 = strideIn * 2;
87 se0Params.ICNT1 = ICNT2;
88 se0Params.DIMFMT = __SE_DIMFMT_2D;
89 se0Params.VECLEN = SE_VECLEN;
90 se0Params.DECDIM1 = __SE_DECDIM_DIM1;
91 se0Params.DECDIM1SD = __SE_DECDIMSD_DIM0;
92 se0Params.DECDIM1_WIDTH = height * strideIn;
93 se0Params.ELETYPE = SE_ELETYPE;
102 printf(
"Exit VXLIB_tableLookup_checkSrcIdx_init_ci\n");
112 template <u
int32_t dTypeIn, u
int32_t dTypeOut>
120 printf(
"Enter VXLIB_tableLookup_init_ci\n");
124 status = VXLIB_tableLookup_checkSrcIdx_init_ci<dTypeIn, dTypeOut>(handle);
129 status = VXLIB_tableLookup_generic_init_ci<dTypeIn, dTypeOut>(handle, bufParamsIn, bufParamsOut, bufParamsLut,
133 status = VXLIB_tableLookup_lut_init_ci<dTypeIn, dTypeOut>(handle, bufParamsIn, bufParamsOut, bufParamsLut,
138 printf(
"Exit VXLIB_tableLookup_init_ci\n");
176 printf(
"Enter VXLIB_tableLookup_set_ci\n");
183 status = VXLIB_tableLookup_generic_set_ci<dataType>(handle, lut);
186 status = VXLIB_tableLookup_lut_set_ci<dataType>(handle, lut);
190 printf(
"Exit VXLIB_tableLookup_set_ci\n");
204 template <
typename dataType>
210 printf(
"Enter VXLIB_tableLookup_checkSrcIdx_exec_ci\n");
216 size_t height = pKerPrivArgs->
height;
219 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
222 __SE_TEMPLATE_v1 se0Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
223 __SE_TEMPLATE_v1 se1Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
224 se1Params.DECDIM1_WIDTH = (height % 2 == 0) ? (height * strideIn) : ((height - 1) * strideIn);
226 typedef typename c7x::make_full_vector<uint8_t>::type vec;
228 vec offsetVec = (vec) offset;
229 vec countVec = (vec) (count - 1);
230 countVec -= offsetVec;
232 uint8_t *pInLocal = (uint8_t *) pIn;
234 vec flagVec0 = (vec) 0;
235 vec flagVec1 = (vec) 0;
236 vec oneVec = (vec) 1;
238 __SE0_OPEN(pInLocal, se0Params);
239 __SE1_OPEN(pInLocal + strideIn, se1Params);
241 for (int32_t i = 0; i < numBlocksIdxCheck; i++) {
242 vec srcVec0 = c7x::strm_eng<0, vec>::get_adv();
243 vec srcVec1 = c7x::strm_eng<1, vec>::get_adv();
245 __vpred vpred0 = __cmp_gt_pred(srcVec0, countVec);
246 __vpred vpred1 = __cmp_gt_pred(srcVec1, countVec);
248 flagVec0 = __select(vpred0, oneVec, flagVec0);
249 flagVec1 = __select(vpred1, oneVec, flagVec1);
253 flagVec0 += flagVec1;
254 uint32_t flag = __horizontal_add(flagVec0);
257 printf(
"Exit VXLIB_tableLookup_checkSrcIdx_exec_ci \n");
266 printf(
"Enter VXLIB_tableLookup_checkSrcIdx_exec_ci\n");
272 size_t height = pKerPrivArgs->
height;
275 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
278 __SE_TEMPLATE_v1 se0Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
279 __SE_TEMPLATE_v1 se1Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
280 se1Params.DECDIM1_WIDTH = (height % 2 == 0) ? (height * strideIn) : ((height - 1) * strideIn);
282 typedef typename c7x::make_full_vector<uint16_t>::type vec;
284 vec offsetVec = (vec) offset;
285 vec countVec = (vec) (count - 1);
286 countVec -= offsetVec;
288 uint16_t *pInLocal = (uint16_t *) pIn;
290 vec flagVec0 = (vec) 0;
291 vec flagVec1 = (vec) 0;
292 vec oneVec = (vec) 1;
294 __SE0_OPEN(pInLocal, se0Params);
295 __SE1_OPEN(pInLocal + strideIn, se1Params);
297 for (int32_t i = 0; i < numBlocksIdxCheck; i++) {
298 vec srcVec0 = c7x::strm_eng<0, vec>::get_adv();
299 vec srcVec1 = c7x::strm_eng<1, vec>::get_adv();
301 __vpred vpred0 = __cmp_gt_pred(srcVec0, countVec);
302 __vpred vpred1 = __cmp_gt_pred(srcVec1, countVec);
304 flagVec0 = __select(vpred0, oneVec, flagVec0);
305 flagVec1 = __select(vpred1, oneVec, flagVec1);
309 flagVec0 += flagVec1;
310 uint32_t flag = __horizontal_add(flagVec0);
313 printf(
"Exit VXLIB_tableLookup_checkSrcIdx_exec_ci \n");
321 printf(
"Enter VXLIB_tableLookup_checkSrcIdx_exec_ci\n");
327 size_t height = pKerPrivArgs->
height;
330 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
333 __SE_TEMPLATE_v1 se0Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
334 __SE_TEMPLATE_v1 se1Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
335 se1Params.DECDIM1_WIDTH = (height % 2 == 0) ? (height * strideIn) : ((height - 1) * strideIn);
337 typedef typename c7x::make_full_vector<int8_t>::type vec;
338 typedef typename c7x::make_full_vector<uint8_t>::type uvec;
340 uvec offsetVec = (uvec) offset;
341 uvec countVec = (uvec) (count - 1);
343 vec zeroVec = (vec) (-(int8_t) offset);
345 int8_t *pInLocal = (int8_t *) pIn;
347 vec flagVec0 = (vec) 0;
348 vec flagVec1 = (vec) 0;
349 vec oneVec = (vec) 1;
351 __SE0_OPEN(pInLocal, se0Params);
352 __SE1_OPEN(pInLocal + strideIn, se1Params);
354 for (int32_t i = 0; i < numBlocksIdxCheck; i++) {
355 vec srcVec0 = c7x::strm_eng<0, vec>::get_adv();
356 vec srcVec1 = c7x::strm_eng<1, vec>::get_adv();
358 __vpred vpred0 = __cmp_gt_pred(c7x::as_uchar_vec(srcVec0 + c7x::as_char_vec(offsetVec)), countVec);
359 __vpred vpred1 = __cmp_gt_pred(c7x::as_uchar_vec(srcVec1 + c7x::as_char_vec(offsetVec)), countVec);
361 __vpred vpred2 = __cmp_gt_pred(zeroVec, srcVec0);
362 __vpred vpred3 = __cmp_gt_pred(zeroVec, srcVec1);
364 vpred0 = __or(vpred0, vpred2);
365 vpred1 = __or(vpred1, vpred3);
367 flagVec0 = __select(vpred0, oneVec, flagVec0);
368 flagVec1 = __select(vpred1, oneVec, flagVec1);
373 flagVec0 += flagVec1;
374 uint32_t flag = __horizontal_add(flagVec0);
377 printf(
"Exit VXLIB_tableLookup_checkSrcIdx_exec_ci \n");
386 printf(
"Enter VXLIB_tableLookup_checkSrcIdx_exec_ci\n");
392 size_t height = pKerPrivArgs->
height;
395 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
398 __SE_TEMPLATE_v1 se0Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
399 __SE_TEMPLATE_v1 se1Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock +
SE0_PARAM_OFFSET);
400 se1Params.DECDIM1_WIDTH = (height % 2 == 0) ? (height * strideIn) : ((height - 1) * strideIn);
402 typedef typename c7x::make_full_vector<int16_t>::type vec;
403 typedef typename c7x::make_full_vector<uint16_t>::type uvec;
405 uvec offsetVec = (uvec) offset;
406 uvec countVec = (uvec) (count - 1);
408 vec zeroVec = (vec) (-(int16_t) offset);
410 int16_t *pInLocal = (int16_t *) pIn;
412 vec flagVec0 = (vec) 0;
413 vec flagVec1 = (vec) 0;
414 vec oneVec = (vec) 1;
416 __SE0_OPEN(pInLocal, se0Params);
417 __SE1_OPEN(pInLocal + strideIn, se1Params);
419 for (int32_t i = 0; i < numBlocksIdxCheck; i++) {
420 vec srcVec0 = c7x::strm_eng<0, vec>::get_adv();
421 vec srcVec1 = c7x::strm_eng<1, vec>::get_adv();
423 __vpred vpred0 = __cmp_gt_pred(c7x::as_ushort_vec(srcVec0 + c7x::as_short_vec(offsetVec)), countVec);
424 __vpred vpred1 = __cmp_gt_pred(c7x::as_ushort_vec(srcVec1 + c7x::as_short_vec(offsetVec)), countVec);
426 __vpred vpred2 = __cmp_gt_pred(zeroVec, srcVec0);
427 __vpred vpred3 = __cmp_gt_pred(zeroVec, srcVec1);
429 vpred0 = __or(vpred0, vpred2);
430 vpred1 = __or(vpred1, vpred3);
432 flagVec0 = __select(vpred0, oneVec, flagVec0);
433 flagVec1 = __select(vpred1, oneVec, flagVec1);
437 flagVec0 += flagVec1;
438 uint32_t flag = __horizontal_add(flagVec0);
441 printf(
"Exit VXLIB_tableLookup_checkSrcIdx_exec_ci \n");
447 template <
typename dataType>
452 printf(
"Enter VXLIB_tableLookup_exec_ci\n");
456 status = VXLIB_tableLookup_checkSrcIdx_exec_ci<dataType>(handle, pIn);
462 status = VXLIB_tableLookup_generic_exec_ci<dataType>(handle, pIn, pOut, lut);
465 status = VXLIB_tableLookup_lut_exec_ci<dataType>(handle, pIn, pOut, lut);
472 printf(
"Exit VXLIB_tableLookup_exec_ci \n");
493 template <u
int32_t dTypeIn, u
int32_t dTypeLut>
502 *archCycles = 1 + numBlocksIdxCheck * 1;
510 *archCycles = 3 + numBlocksIdxCheck * 2;
518 *archCycles = 1 + numBlocksIdxCheck * 1;
526 *archCycles = 3 + numBlocksIdxCheck * 2;
529 template <u
int32_t dTypeIn, u
int32_t dTypeLut>
550 *archCycles = iterConst + numBlocksLut * ii;
569 *archCycles = iterConst + numBlocksLut * ii;
590 *archCycles = iterConst + numBlocksLut * ii;
609 *archCycles = iterConst + numBlocksLut * ii;
618 *archCycles = 10 + numBlocksLut * 8;
637 const uint32_t dTypeIn = bufParamsIn->
data_type;
638 const uint32_t dTypeOut = bufParamsOut->
data_type;
639 const uint32_t dTypeLut = bufParamsLut->
data_type;
642 size_t overheadCnt = 110;
649 VXLIB_idxCheck_perfEst<VXLIB_TABLELOOKUP_DTYPE_I8U_O8U>(handle, &archSrcIdx);
652 VXLIB_idxCheck_perfEst<VXLIB_TABLELOOKUP_DTYPE_I8S_O8S>(handle, &archSrcIdx);
655 VXLIB_idxCheck_perfEst<VXLIB_TABLELOOKUP_DTYPE_I16U_O16U>(handle, &archSrcIdx);
658 VXLIB_idxCheck_perfEst<VXLIB_TABLELOOKUP_DTYPE_I16S_O16S>(handle, &archSrcIdx);
663 size_t width = pKerPrivArgs->
width;
668 VXLIB_lut_perfEst<VXLIB_TABLELOOKUP_DTYPE_I8U_O8U>(handle, &archLutLogic, width);
671 VXLIB_lut_perfEst<VXLIB_TABLELOOKUP_DTYPE_I8S_O8S>(handle, &archLutLogic, width);
674 VXLIB_lut_perfEst<VXLIB_TABLELOOKUP_DTYPE_I16U_O16U>(handle, &archLutLogic, width);
677 VXLIB_lut_perfEst<VXLIB_TABLELOOKUP_DTYPE_I16S_O16S>(handle, &archLutLogic, width);
682 VXLIB_generic_perfEst<VXLIB_TABLELOOKUP_DTYPE_I8U_O8U>(handle, &archLutLogic);
685 VXLIB_generic_perfEst<VXLIB_TABLELOOKUP_DTYPE_I8S_O8S>(handle, &archLutLogic);
688 VXLIB_generic_perfEst<VXLIB_TABLELOOKUP_DTYPE_I16U_O16U>(handle, &archLutLogic);
691 VXLIB_generic_perfEst<VXLIB_TABLELOOKUP_DTYPE_I16S_O16S>(handle, &archLutLogic);
694 *archCycles = archSrcIdx + archLutLogic;
695 *estCycles = *archCycles + overheadCnt;
template VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_init_ci< VXLIB_TABLELOOKUP_DTYPE_I16S_O16S >(VXLIB_kernelHandle handle)
void VXLIB_idxCheck_perfEst< VXLIB_INT16, VXLIB_INT16 >(VXLIB_kernelHandle handle, size_t *archCycles)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< int16_t >(VXLIB_kernelHandle handle, void *restrict lut)
template void VXLIB_generic_perfEst< VXLIB_INT16, VXLIB_INT16 >(VXLIB_kernelHandle handle, size_t *archCycles)
void VXLIB_idxCheck_perfEst< VXLIB_INT8, VXLIB_INT8 >(VXLIB_kernelHandle handle, size_t *archCycles)
template VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_init_ci< VXLIB_TABLELOOKUP_DTYPE_I8U_O8U >(VXLIB_kernelHandle handle)
template void VXLIB_generic_perfEst< VXLIB_INT8, VXLIB_INT8 >(VXLIB_kernelHandle handle, size_t *archCycles)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< int8_t >(VXLIB_kernelHandle handle, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< uint16_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
void VXLIB_generic_perfEst(VXLIB_kernelHandle handle, size_t *archCycles)
template VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_init_ci< VXLIB_TABLELOOKUP_DTYPE_I16U_O16U >(VXLIB_kernelHandle handle)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< int8_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
VXLIB_STATUS VXLIB_tableLookup_set_ci(VXLIB_kernelHandle handle, void *restrict lut)
This function set the lookup table in L1D SRAM for the C7x implementation of the kernel....
void VXLIB_idxCheck_perfEst< VXLIB_UINT8, VXLIB_UINT8 >(VXLIB_kernelHandle handle, size_t *archCycles)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I16U_O16U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
VXLIB_STATUS VXLIB_tableLookup_exec_ci(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
This function is the main execution function for the C7x implementation of the kernel....
VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_init_ci(VXLIB_kernelHandle handle)
template void VXLIB_generic_perfEst< VXLIB_UINT8, VXLIB_UINT8 >(VXLIB_kernelHandle handle, size_t *archCycles)
VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_exec_ci< uint8_t >(VXLIB_kernelHandle handle, void *restrict pIn)
template VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_init_ci< VXLIB_TABLELOOKUP_DTYPE_I8S_O8S >(VXLIB_kernelHandle handle)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< uint8_t >(VXLIB_kernelHandle handle, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< int16_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
void VXLIB_lut_perfEst< VXLIB_INT8, VXLIB_INT8 >(VXLIB_kernelHandle handle, size_t *archCycles, size_t width)
void VXLIB_lut_perfEst< VXLIB_UINT8, VXLIB_UINT8 >(VXLIB_kernelHandle handle, size_t *archCycles, size_t width)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I16S_O16S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
void VXLIB_lut_perfEst< VXLIB_UINT16, VXLIB_UINT16 >(VXLIB_kernelHandle handle, size_t *archCycles, size_t width)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I8U_O8U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
void VXLIB_lut_perfEst(VXLIB_kernelHandle handle, size_t *archCycles, size_t width)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< uint16_t >(VXLIB_kernelHandle handle, void *restrict lut)
#define VXLIB_COUNT_LIMIT
VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_exec_ci< int8_t >(VXLIB_kernelHandle handle, void *restrict pIn)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I8S_O8S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
VXLIB_STATUS VXLIB_tableLookup_init_ci(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
This function is the initialization function for the C7x implementation of the kernel....
void VXLIB_lut_perfEst< VXLIB_INT16, VXLIB_INT16 >(VXLIB_kernelHandle handle, size_t *archCycles, size_t width)
template void VXLIB_generic_perfEst< VXLIB_UINT16, VXLIB_UINT16 >(VXLIB_kernelHandle handle, size_t *archCycles)
VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_exec_ci(VXLIB_kernelHandle handle, void *restrict pIn)
VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_exec_ci< int16_t >(VXLIB_kernelHandle handle, void *restrict pIn)
void VXLIB_idxCheck_perfEst< VXLIB_UINT16, VXLIB_UINT16 >(VXLIB_kernelHandle handle, size_t *archCycles)
VXLIB_STATUS VXLIB_tableLookup_checkSrcIdx_exec_ci< uint16_t >(VXLIB_kernelHandle handle, void *restrict pIn)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< uint8_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
void VXLIB_idxCheck_perfEst(VXLIB_kernelHandle handle, size_t *archCycles)
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_tableLookup.
#define WIDTH_UNROLL_FACTOR
#define VXLIB_TABLELOOKUP_I16U_I16U_O16U
#define VXLIB_TABLELOOKUP_I8S_I8S_O8S
#define VXLIB_TABLELOOKUP_I8U_I8U_O8U
Macros that will be useful to check for datatype combinations.
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
VXLIB_STATUS_NAME
The enumeration of all status codes.
@ VXLIB_ERR_INVALID_DIMENSION
void VXLIB_tableLookup_perfEst(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs, size_t *archCycles, size_t *estCycles)
This function estimates the archCycles and estCycles.
A structure for a 1 dimensional buffer descriptor.
uint32_t data_type
Values are of type VXLIB_data_type_e.
A structure for a 2 dimensional buffer descriptor.
uint32_t data_type
Values are of type VXLIB_data_type_e.
Structure containing the parameters to initialize the kernel.
uint32_t count
Parameter indicating size of lookup table
uint16_t offset
Parameter indicating index of input value = 0 in the lookup table
Structure that is reserved for internal use by the kernel.
size_t numBlocksLut
Number of blocks to be processed for lut logic after simidfication.
VXLIB_tableLookup_InitArgs pKerInitArgs
Initargs of the kernel.
size_t width
Width of image
size_t height
Height of image
size_t numBlocksIdxCheck
Number of blocks to be processed for index check after simidfication.
size_t strideInElements
Stride of input in elements.
uint8_t bufPblock[VXLIB_TABLELOOKUP_IXX_IXX_OXX_PBLOCK_SIZE]
Array to hold SE/SA params.