/*                                                                          */
/* Function    : define DSP computation utilities, suits TI DSPs only       */
/*                                                                          */
/* Macros      1)                                                           */
/*                                                                          */
#include  "windef.h"
#include  "mbdr_dsp_ti_assembly_simulation.h"
#include  "mbdr_dsp_utils.h"
#ifndef _MBDR_DSP_TI_UTILS_H__
#define _MBDR_DSP_TI_UTILS_H__

/* multiplies Q16 32BIT by Q16 32BIT                          */
/* there is no handle in overflow                             */
/* bits 31..16 are the integer part, bits 15..0 fraction part */
/* Restriction BIT 31 is assumed to be cleared                */
#define MBDR_DSP_TI_UTILS_MUL_S32Q16_M(PI_A, PI_B)\
  ( (_mpyu(PI_A, PI_B)>>16)&0x0ffff)\
   + _mpyhslu(PI_A, PI_B)\
   + _mpyhslu(PI_B, PI_A)\
   +(_mpyhl(PI_A, (PI_B>>16)) << 16)

			   
#endif
