MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
MMAU Unsigned Integer Routines

Overview

This section describes arithmetic routines on unsigned integer data types.

Return typeUMUL UMULS UMAC UMACS UDIV USQR Load/Read
uint16- - - - - s_usqr_l -
uint32- - - - l_udiv_ll l_usqr_d
l_usqra
l_urda
uint64d_umul_ll
d_umul_dl
d_umula_l
d_umuls_dl
d_umulas_l
d_umac_ll
d_umac_dl
d_umaca_dl
d_umacs_ll
d_umacs_dl
d_umacas_dl
d_udiv_dl
d_udiva_l
d_udiv_dd
d_udiva_d
- d_urda
void umul_ll
umul_dl
umula_l
umuls_dl
umulas_l
umac_ll
umac_dl
umaca_dl
umacs_ll
umacs_dl
umacas_dl
udiv_ll
udiv_dl
udiva_l
udiv_dd
udiva_d
usqr_l
usqr_d
ulda_d

Macros

#define ulda_d(dval)
 Load A10 accumulator register of the MMAU by 64-bit unsigned value. More...
 
#define umul_ll(lval1, lval2)
 Multiply two 32-bit unsigned values. More...
 
#define umul_dl(dval, lval)
 Multiply 64-bit unsigned value with 32-bit unsigned value. More...
 
#define umuls_dl(dval, lval)
 Saturating multiply 64-bit unsigned value with 32-bit unsigned value. More...
 
#define umula_l(lval)
 Multiply 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU. More...
 
#define umulas_l(lval)
 Saturating multiply 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU. More...
 
#define umac_ll(lval1, lval2)
 Multiply two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU. More...
 
#define umacs_ll(lval1, lval2)
 Saturating multiply two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU. More...
 
#define umac_dl(dval, lval)
 Multiply 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU. More...
 
#define umacs_dl(dval, lval)
 Saturating multiply 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU. More...
 
#define umaca_dl(dval, lval)
 Multiply 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value. More...
 
#define umacas_dl(dval, lval)
 Saturating multiply 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value. More...
 
#define udiv_ll(lnum, lden)
 Divide two 32-bit unsigned values. More...
 
#define udiv_dl(dnum, lden)
 Divide 64-bit unsigned value by 32-bit unsigned value. More...
 
#define udiv_dd(dnum, dden)
 Divide two 64-bit unsigned values. More...
 
#define udiva_l(lden)
 Divide 64-bit unsigned value stored in the A10 register of the MMAU by 32-bit unsigned value. More...
 
#define udiva_d(dden)
 Divide 64-bit unsigned value stored in the A10 register of the MMAU by 64-bit unsigned value. More...
 
#define usqr_l(lrad)
 Compute a 16-bit unsigned square root of the 32-bit unsigned radicand. More...
 
#define usqr_d(drad)
 Compute a 32-bit unsigned square root of the 64-bit unsigned radicand. More...
 

Functions

static uint32 l_urda (void)
 Read 32-bit unsigned value from the A0 accumulator register of the MMAU. More...
 
static uint64 d_urda (void)
 Read 64-bit unsigned value from the A10 accumulator register of the MMAU. More...
 
static uint64 d_umul_ll (register uint32 lval1, register uint32 lval2)
 Multiply two 32-bit unsigned values returning a 64-bit unsigned product. More...
 
static uint64 d_umul_dl (register uint64 dval, register uint32 lval)
 Multiply 64-bit unsigned value with 32-bit unsigned value returning a 64-bit unsigned product. More...
 
static uint64 d_umuls_dl (register uint64 dval, register uint32 lval)
 Saturating multiply 64-bit unsigned value with 32-bit unsigned value returning saturated 64-bit unsigned product. More...
 
static uint64 d_umula_l (register uint32 lval)
 Multiply 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU returning a 64-bit unsigned product. More...
 
static uint64 d_umulas_l (register uint32 lval)
 Saturating multiply 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU returning saturated 64-bit unsigned product. More...
 
static uint64 d_umac_ll (register uint32 lval1, register uint32 lval2)
 Multiply two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU returning a 64-bit unsigned A10 register value. More...
 
static uint64 d_umacs_ll (register uint32 lval1, register uint32 lval2)
 Saturating multiply two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU returning a 64-bit unsigned A10 register value. More...
 
static uint64 d_umac_dl (register uint64 dval, register uint32 lval)
 Multiply 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU returning a 64-bit unsigned A10 register value. More...
 
static uint64 d_umacs_dl (register uint64 dval, register uint32 lval)
 Saturating multiply 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU returning saturated 64-bit unsigned A10 register value. More...
 
static uint64 d_umaca_dl (register uint64 dval, register uint32 lval)
 Multiply 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value returning a 64-bit unsigned A10 register value. More...
 
static uint64 d_umacas_dl (register uint64 dval, register uint32 lval)
 Saturating multiply 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value returning a saturated 64-bit unsigned A10 register value. More...
 
static uint32 l_udiv_ll (register uint32 lnum, register uint32 lden)
 Divide two 32-bit unsigned values returning a 32-bit unsigned quotient. More...
 
static uint64 d_udiv_dl (register uint64 dnum, register uint32 lden)
 Divide 64-bit unsigned value by 32-bit unsigned value returning a 64-bit unsigned quotient. More...
 
static uint64 d_udiv_dd (register uint64 dnum, register uint64 dden)
 Divide two 64-bit unsigned values returning a 64-bit unsigned quotient. More...
 
static uint64 d_udiva_l (register uint32 lden)
 Divide 64-bit unsigned value stored in the A10 register of the MMAU by 32-bit unsigned value returning a 64-bit unsigned quotient. More...
 
static uint64 d_udiva_d (register uint64 dden)
 Divide 64-bit unsigned value stored in the A10 register of the MMAU by 64-bit unsigned value returning a 64-bit unsigned quotient. More...
 
static uint16 s_usqr_l (register uint32 lrad)
 Compute and return a 16-bit unsigned square root of the 32-bit unsigned radicand. More...
 
static uint32 l_usqr_d (register uint64 drad)
 Compute and return a 32-bit unsigned square root of the 64-bit unsigned radicand. More...
 
static uint32 l_usqra (void)
 Compute and return a 32-bit unsigned square root of the radicand stored in the A10 register of the MMAU. More...
 

Macro Definition Documentation

#define ulda_d (   dval)

The ulda_d function loads A10 accumulator register of the MMAU by 64-bit unsigned value.

Parameters
dvaluint64 unsigned value.
#define umul_ll (   lval1,
  lval2 
)

The umul_ll function multiplies two 32-bit unsigned values.

Parameters
lval1uint32 unsigned value.
lval2uint32 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
#define umul_dl (   dval,
  lval 
)

The umul_dl function multiplies 64-bit unsigned value with 32-bit unsigned value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
#define umuls_dl (   dval,
  lval 
)

The umuls_dl function multiplies 64-bit unsigned value with 32-bit unsigned value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
#define umula_l (   lval)

The umula_l function multiplies 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU.

Parameters
lvaluint32 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
#define umulas_l (   lval)

The umulas_l function multiplies 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU.

Parameters
lvaluint32 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
#define umac_ll (   lval1,
  lval2 
)

The umac_ll function multiplies two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU.

Parameters
lval1uint32 unsigned value.
lval2uint32 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
#define umacs_ll (   lval1,
  lval2 
)

The umacs_ll function multiplies two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU.

Parameters
lval1uint32 unsigned value.
lval2uint32 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
#define umac_dl (   dval,
  lval 
)

The umac_dl function multiplies 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
#define umacs_dl (   dval,
  lval 
)

The umacs_dl function multiplies 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
#define umaca_dl (   dval,
  lval 
)

The umaca_dl function multiplies 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
#define umacas_dl (   dval,
  lval 
)

The umacas_dl function multiplies 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
#define udiv_ll (   lnum,
  lden 
)

The udiv_ll function divides two 32-bit unsigned values.

Parameters
lnumuint32 unsigned value.
ldenuint32 unsigned value.
Note
Quotient is stored in A0 register of the MMAU for next computation.
#define udiv_dl (   dnum,
  lden 
)

The udiv_dl function divides 64-bit unsigned value by 32-bit unsigned value.

Parameters
dnumuint64 unsigned value.
ldenuint32 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
#define udiv_dd (   dnum,
  dden 
)

The udiv_dd function divides two 64-bit unsigned values.

Parameters
dnumuint64 unsigned value.
ddenuint64 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
#define udiva_l (   lden)

The udiva_l function divides 64-bit unsigned value stored in the A10 register of the MMAU by 32-bit unsigned value.

Parameters
ldenuint32 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
#define udiva_d (   dden)

The udiva_d function divides 64-bit unsigned value stored in the A10 register of the MMAU by 64-bit unsigned value.

Parameters
ddenuint64 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
#define usqr_l (   lrad)

The usqr_l function computes a 16-bit unsigned square root of the 32-bit unsigned radicand.

Parameters
lraduint32 unsigned radicand.
Note
Square root is stored in A0 register of the MMAU for next computation.
#define usqr_d (   drad)

The usqr_d function computes a 32-bit unsigned square root of the 64-bit unsigned radicand.

Parameters
draduint64 unsigned radicand.
Note
Square root is stored in A0 register of the MMAU for next computation.

Function Documentation

static uint32 l_urda ( void  )
inlinestatic

The l_urda function reads 32-bit unsigned value from the A0 accumulator register of the MMAU.

Returns
uint32 unsigned value.
static uint64 d_urda ( void  )
inlinestatic

The d_urda function reads 64-bit unsigned value from the A10 accumulator register of the MMAU.

Returns
uint64 unsigned value.
static uint64 d_umul_ll ( register uint32  lval1,
register uint32  lval2 
)
inlinestatic

The d_umul_ll function multiplies two 32-bit unsigned values returning a 64-bit unsigned product.

Parameters
lval1uint32 unsigned value.
lval2uint32 unsigned value.
Returns
uint64 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
static uint64 d_umul_dl ( register uint64  dval,
register uint32  lval 
)
inlinestatic

The d_umul_dl function multiplies 64-bit unsigned value with 32-bit unsigned value returning a 64-bit unsigned product.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
static uint64 d_umuls_dl ( register uint64  dval,
register uint32  lval 
)
inlinestatic

The d_umuls_dl function multiplies 64-bit unsigned value with 32-bit unsigned value returning saturated 64-bit unsigned product.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
static uint64 d_umula_l ( register uint32  lval)
inlinestatic

The d_umula_l function multiplies 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU returning a 64-bit unsigned product.

Parameters
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
static uint64 d_umulas_l ( register uint32  lval)
inlinestatic

The d_umulas_l function multiplies 32-bit unsigned value with 64-bit unsigned value stored in the A10 register of the MMAU returning saturated 64-bit unsigned product.

Parameters
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
static uint64 d_umac_ll ( register uint32  lval1,
register uint32  lval2 
)
inlinestatic

The d_umac_ll function multiplies two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU returning a 64-bit unsigned A10 register value.

Parameters
lval1uint32 unsigned value.
lval2uint32 unsigned value.
Returns
uint64 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
static uint64 d_umacs_ll ( register uint32  lval1,
register uint32  lval2 
)
inlinestatic

The d_umacs_ll function multiplies two 32-bit unsigned values and add product with value stored in the A10 register of the MMAU returning saturated 64-bit unsigned A10 register value.

Parameters
lval1uint32 unsigned value.
lval2uint32 unsigned value.
Returns
uint64 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
static uint64 d_umac_dl ( register uint64  dval,
register uint32  lval 
)
inlinestatic

The d_umac_dl function multiplies 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU returning a 64-bit unsigned A10 register value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
static uint64 d_umacs_dl ( register uint64  dval,
register uint32  lval 
)
inlinestatic

The d_umacs_dl function multiplies 64-bit unsigned value with 32-bit unsigned value and add product with value stored in the A10 register of the MMAU returning saturated 64-bit unsigned A10 register value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
static uint64 d_umaca_dl ( register uint64  dval,
register uint32  lval 
)
inlinestatic

The d_umaca_dl function multiplies 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value returning a 64-bit unsigned A10 register value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Product is stored in A10 register of the MMAU for next computation.
static uint64 d_umacas_dl ( register uint64  dval,
register uint32  lval 
)
inlinestatic

The d_umacas_dl function multiplies 32-bit unsigned value by value stored in the A10 register of the MMAU and add product with 64-bit unsigned value returning saturated 64-bit unsigned A10 register value.

Parameters
dvaluint64 unsigned value.
lvaluint32 unsigned value.
Returns
uint64 unsigned value.
Note
Saturated product is stored in A10 register of the MMAU for next computation.
static uint32 l_udiv_ll ( register uint32  lnum,
register uint32  lden 
)
inlinestatic

The l_udiv_ll function divides two 32-bit unsigned values returning a 32-bit unsigned quotient.

Parameters
lnumuint32 unsigned value.
ldenuint32 unsigned value.
Returns
uint32 unsigned value.
Note
Quotient is stored in A0 register of the MMAU for next computation.
static uint64 d_udiv_dl ( register uint64  dnum,
register uint32  lden 
)
inlinestatic

The d_udiv_dl function divides 64-bit unsigned value by 32-bit unsigned value returning a 64-bit unsigned quotient.

Parameters
dnumuint64 unsigned value.
ldenuint32 unsigned value.
Returns
uint64 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
static uint64 d_udiv_dd ( register uint64  dnum,
register uint64  dden 
)
inlinestatic

The d_udiv_dd function divides two 64-bit unsigned values returning a 64-bit unsigned quotient.

Parameters
dnumuint64 unsigned value.
ddenuint64 unsigned value.
Returns
uint64 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
static uint64 d_udiva_l ( register uint32  lden)
inlinestatic

The d_udiva_l function divides 64-bit unsigned value stored in the A10 register of the MMAU by 32-bit unsigned value returning a 64-bit unsigned quotient.

Parameters
ldenuint32 unsigned value.
Returns
uint64 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
static uint64 d_udiva_d ( register uint64  dden)
inlinestatic

The d_udiva_d function divides 64-bit unsigned value stored in the A10 register of the MMAU by 64-bit unsigned value returning a 64-bit unsigned quotient.

Parameters
ddenuint64 unsigned value.
Returns
uint64 unsigned value.
Note
Quotient is stored in A10 register of the MMAU for next computation.
static uint16 s_usqr_l ( register uint32  lrad)
inlinestatic

The s_usqr_l function computes and returns a 16-bit unsigned square root of the 32-bit unsigned radicand.

Parameters
lraduint32 unsigned radicand.
Returns
uint16 unsigned square root.
Note
Square root is stored in A0 register of the MMAU for next computation.
static uint32 l_usqr_d ( register uint64  drad)
inlinestatic

The l_usqr_d function computes and returns a 32-bit unsigned square root of the 64-bit unsigned radicand.

Parameters
draduint64 unsigned radicand.
Returns
uint32 unsigned square root.
Note
Square root is stored in A0 register of the MMAU for next computation.
static uint32 l_usqra ( void  )
inlinestatic

The l_usqra function computes and returns a 32-bit unsigned square root of the radicand stored in the A10 register of the MMAU.

Returns
uint32 unsigned square root.
Note
Square root is stored in A0 register of the MMAU for next computation.