![]() |
MKM34Z256VLx7 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This section describes arithmetic routines on signed fractional data types.
Return type | MUL | MULS | MAC | MACS | DIV | DIVS | SQR | Load/Read |
---|---|---|---|---|---|---|---|---|
frac16 | - | - | - | - | s_sqr_l | - | ||
frac32 | l_mul_ll l_mul_dl l_mula_l | l_muls_dl l_mulas_l | l_mac_ll l_mac_dl l_maca_dl | l_macs_ll l_macs_dl l_macas_dl | l_div_ll | l_divs_ll | l_sqr_d l_sqra | l_rda |
frac64 | d_mul_ll d_mul_dl d_mula_l | d_muls_dl d_mulas_l | d_mac_ll d_mac_dl d_maca_dl | d_macs_ll d_macs_dl d_macas_dl | d_div_dl d_diva_l | d_divs_dl d_divas_l | - | d_rda |
void | mul_ll mul_dl mula_l | muls_dl mulas_l | mac_ll mac_dl maca_dl | macs_ll macs_dl macas_dl | div_ll div_dl diva_l | divs_ll divs_dl divas_l | sqr_l sqr_d | lda_l lda_d |
Macros | |
#define | lda_d(dval) |
Load A10 accumulator register of the MMAU by 64-bit fractional value. More... | |
#define | mul_ll(lval1, lval2) |
Multiply two 32-bit fractional values. More... | |
#define | muls_ll(lval1, lval2) |
Saturating multiply two 32-bit fractional values. More... | |
#define | mul_dl(dval, lval) |
Multiply 64-bit fractional value with 32-bit fractional value. More... | |
#define | muls_dl(dval, lval) |
Saturating multiply 64-bit fractional value with 32-bit fractional value. More... | |
#define | mula_l(lval) |
Multiply 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU. More... | |
#define | mulas_l(lval) |
Saturating multiply 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU. More... | |
#define | mac_ll(lval1, lval2) |
Multiply two 32-bit fractional values and add product with value stored in the A10 register of the MMAU. More... | |
#define | macs_ll(lval1, lval2) |
Saturating multiply two 32-bit fractional values and add product with value stored in the A10 register of the MMAU. More... | |
#define | mac_dl(dval, lval) |
Multiply 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU. More... | |
#define | macs_dl(dval, lval) |
Saturating multiply 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU. More... | |
#define | maca_dl(dval, lval) |
Multiply 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value. More... | |
#define | macas_dl(dval, lval) |
Saturating multiply 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value. More... | |
#define | div_ll(lnum, lden) |
Divide two 32-bit fractional values. More... | |
#define | divs_ll(lnum, lden) |
Divide two 32-bit fractional values. More... | |
#define | div_dl(dnum, lden) |
Divide 64-bit fractional value by 32-bit fractional value. More... | |
#define | divs_dl(dnum, lden) |
Divide 64-bit fractional value by 32-bit fractional value. More... | |
#define | diva_l(lden) |
Divide 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value. More... | |
#define | divas_l(lden) |
Divide 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value. More... | |
#define | sqr_l(lrad) |
Compute a 16-bit fractional square root of the 32-bit fractional radicand. More... | |
#define | sqr_d(drad) |
Compute a 32-bit fractional square root of the 64-bit fractional radicand. More... | |
Functions | |
static void | lda_l (register frac32 lval) |
Load upper A1 accumulator register of the MMAU by 32-bit fractional value and clear lower A0 accumulator register. More... | |
static frac32 | l_rda (void) |
Read 32-bit fractional value from the A1 accumulator register of the MMAU. More... | |
static frac64 | d_rda (void) |
Read 64-bit fractional value from the A10 accumulator register of the MMAU. More... | |
static frac32 | l_mul_ll (register frac32 lval1, register frac32 lval2) |
Multiply two 32-bit fractional values returning a 32-bit fractional product. More... | |
static frac32 | l_muls_ll (register frac32 lval1, register frac32 lval2) |
Saturating multiply two 32-bit fractional values returning saturated 32-bit fractional product. More... | |
static frac64 | d_mul_ll (register frac32 lval1, register frac32 lval2) |
Multiply two 32-bit fractional values returning a 64-bit fractional product. More... | |
static frac64 | d_muls_ll (register frac32 lval1, register frac32 lval2) |
Saturating multiply two 32-bit fractional values returning saturated 64-bit fractional product. More... | |
static frac32 | l_mul_dl (register frac64 dval, register frac32 lval) |
Multiply 64-bit fractional value with 32-bit fractional value returning a 32-bit fractional product. More... | |
static frac32 | l_muls_dl (register frac64 dval, register frac32 lval) |
Saturating multiply 64-bit fractional value with 32-bit fractional value returning saturated 32-bit fractional product. More... | |
static frac64 | d_mul_dl (register frac64 dval, register frac32 lval) |
Multiply 64-bit fractional value with 32-bit fractional value returning a 64-bit fractional product. More... | |
static frac64 | d_muls_dl (register frac64 dval, register frac32 lval) |
Saturating multiply 64-bit fractional value with 32-bit fractional value returning saturated 64-bit fractional product. More... | |
static frac32 | l_mula_l (register frac32 lval) |
Multiply 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning a 32-bit fractional product. More... | |
static frac32 | l_mulas_l (register frac32 lval) |
Saturating multiply 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning saturated 32-bit fractional product. More... | |
static frac64 | d_mula_l (register frac32 lval) |
Multiply 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning a 64-bit fractional product. More... | |
static frac64 | d_mulas_l (register frac32 lval) |
Saturating multiply 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning saturated 64-bit fractional product. More... | |
static frac32 | l_mac_ll (register frac32 lval1, register frac32 lval2) |
Multiply two 32-bit fractional values and add product with value stored in the A10 register of the MMAU returning a 32-bit fractional A10 register value. More... | |
static frac32 | l_macs_ll (register frac32 lval1, register frac32 lval2) |
Saturating multiply two 32-bit fractional values and add product with value stored in the A10 register of the MMAU returning a 32-bit fractional A10 register value. More... | |
static frac64 | d_mac_ll (register frac32 lval1, register frac32 lval2) |
Multiply two 32-bit fractional values and add product with value stored in the A10 register of the MMAU returning a 64-bit fractional A10 register value. More... | |
static frac64 | d_macs_ll (register frac32 lval1, register frac32 lval2) |
Saturating multiply two 32-bit fractional values and add product with value stored in the A10 register of the MMAU returning a 64-bit fractional A10 register value. More... | |
static frac32 | l_mac_dl (register frac64 dval, register frac32 lval) |
Multiply 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning a 32-bit fractional A10 register value. More... | |
static frac32 | l_macs_dl (register frac64 dval, register frac32 lval) |
Saturating multiply 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning saturated 32-bit fractional A10 register value. More... | |
static frac64 | d_mac_dl (register frac64 dval, register frac32 lval) |
Multiply 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning a 64-bit fractional A10 register value. More... | |
static frac64 | d_macs_dl (register frac64 dval, register frac32 lval) |
Saturating multiply 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning saturated 64-bit fractional A10 register value. More... | |
static frac32 | l_maca_dl (register frac64 dval, register frac32 lval) |
Multiply 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning a 32-bit fractional A10 register value. More... | |
static frac32 | l_macas_dl (register frac64 dval, register frac32 lval) |
Saturating multiply 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning a saturated 32-bit fractional A10 register value. More... | |
static frac64 | d_maca_dl (register frac64 dval, register frac32 lval) |
Multiply 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning a 64-bit fractional A10 register value. More... | |
static frac64 | d_macas_dl (register frac64 dval, register frac32 lval) |
Saturating multiply 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning a saturated 64-bit fractional A10 register value. More... | |
static frac32 | l_div_ll (register frac32 lnum, register frac32 lden) |
Divide two 32-bit fractional values returning a 32-bit fractional quotient. More... | |
static frac32 | l_divs_ll (register frac32 lnum, register frac32 lden) |
Divide two 32-bit fractional values returning a 32-bit fractional quotient. More... | |
static frac64 | d_div_dl (register frac64 dnum, register frac32 lden) |
Divide 64-bit fractional value by 32-bit fractional value returning a 64-bit fractional quotient. More... | |
static frac64 | d_divs_dl (register frac64 dnum, register frac32 lden) |
Divide 64-bit fractional value by 32-bit fractional value returning a 64-bit fractional quotient. More... | |
static frac32 | l_diva_l (register frac32 lden) |
Divide 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning a 32-bit fractional quotient. More... | |
static frac32 | l_divas_l (register frac32 lden) |
Divide 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning saturated 32-bit fractional quotient. More... | |
static frac64 | d_diva_l (register frac32 lden) |
Divide 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning a 64-bit fractional quotient. More... | |
static frac64 | d_divas_l (register frac32 lden) |
Divide 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning saturated 64-bit fractional quotient. More... | |
static frac16 | s_sqr_l (register frac32 lrad) |
Compute and return a 16-bit fractional square root of the 32-bit fractional radicand. More... | |
static frac32 | l_sqr_l (register frac32 lrad) |
Compute and return a 32-bit fractional square root of the 32-bit fractional radicand. More... | |
static frac32 | l_sqr_d (register frac64 drad) |
Compute and return a 32-bit fractional square root of the 64-bit fractional radicand. More... | |
static frac32 | l_sqra (void) |
Compute and return a 32-bit fractional square root of the radicand stored in the A10 register of the MMAU. More... | |
#define lda_d | ( | dval | ) |
#define mul_ll | ( | lval1, | |
lval2 | |||
) |
#define muls_ll | ( | lval1, | |
lval2 | |||
) |
#define mul_dl | ( | dval, | |
lval | |||
) |
#define muls_dl | ( | dval, | |
lval | |||
) |
#define mula_l | ( | lval | ) |
#define mulas_l | ( | lval | ) |
#define mac_ll | ( | lval1, | |
lval2 | |||
) |
#define macs_ll | ( | lval1, | |
lval2 | |||
) |
#define mac_dl | ( | dval, | |
lval | |||
) |
#define macs_dl | ( | dval, | |
lval | |||
) |
The macs_dl function multiplies 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU.
#define maca_dl | ( | dval, | |
lval | |||
) |
#define macas_dl | ( | dval, | |
lval | |||
) |
The macas_dl function multiplies 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value.
#define div_ll | ( | lnum, | |
lden | |||
) |
#define divs_ll | ( | lnum, | |
lden | |||
) |
#define div_dl | ( | dnum, | |
lden | |||
) |
#define divs_dl | ( | dnum, | |
lden | |||
) |
#define diva_l | ( | lden | ) |
#define divas_l | ( | lden | ) |
#define sqr_l | ( | lrad | ) |
#define sqr_d | ( | drad | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
The l_mula_l function multiplies 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning a 32-bit fractional product.
lval | frac32 fractional value. |
The l_mulas_l function multiplies 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning saturated 32-bit fractional product.
lval | frac32 fractional value. |
The d_mula_l function multiplies 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning a 64-bit fractional product.
lval | frac32 fractional value. |
The d_mulas_l function multiplies 32-bit fractional value with 64-bit fractional value stored in the A10 register of the MMAU returning saturated 64-bit fractional product.
lval | frac32 fractional value. |
The d_macs_ll function multiplies two 32-bit fractional values and add product with value stored in the A10 register of the MMAU returning saturated 64-bit fractional A10 register value.
The l_mac_dl function multiplies 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning a 32-bit fractional A1 register value.
The l_macs_dl function multiplies 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning saturated 32-bit fractional A1 register value.
The d_mac_dl function multiplies 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning a 64-bit fractional A10 register value.
The d_macs_dl function multiplies 64-bit fractional value with 32-bit fractional value and add product with value stored in the A10 register of the MMAU returning saturated 64-bit fractional A10 register value.
The l_maca_dl function multiplies 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning a 32-bit fractional A1 register value.
The l_macas_dl function multiplies 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning saturated 32-bit fractional A1 register value.
The d_maca_dl function multiplies 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning a 64-bit fractional A10 register value.
The d_macas_dl function multiplies 32-bit fractional value by value stored in the A10 register of the MMAU and add product with 64-bit fractional value returning saturated 64-bit fractional A10 register value.
The l_diva_l function divides 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning a 32-bit fractional quotient.
lden | frac32 fractional value. |
The l_divas_l function divides 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning a saturated 32-bit fractional quotient.
lden | frac32 fractional value. |
The d_diva_l function divides 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning a 64-bit fractional quotient.
lden | frac32 fractional value. |
The d_divas_l function divides 64-bit fractional value stored in the A10 register of the MMAU by 32-bit fractional value returning a saturated 64-bit fractional quotient.
lden | frac32 fractional value. |