0.3.1
Division Unit (DIVU)

Typedefs

typedef void(* cpu_divu_ihr_t) (void)
 Callback type.
 

Functions

static bool cpu_divu_status_get (void)
 Determine if an overflow has occurred.
 
static uint32_t cpu_divu_quotient_get (void)
 Obtain the quotient part at the end of a division operation.
 
static uint32_t cpu_divu_remainder_get (void)
 Obtain the remainder part at the end of a division operation.
 
static void cpu_divu_64_32_set (uint32_t dividendh, uint32_t dividendl, uint32_t divisor)
 Perform a 64÷32 bit division operation.
 
static void cpu_divu_32_32_set (uint32_t dividend, uint32_t divisor)
 Perform a 32÷32 bit division operation.
 
static void cpu_divu_fix16_split (fix16_t dividend, uint32_t *dh, uint32_t *dl)
 Split a fix16_t value into two 32-bit parts of the dividend.
 
static void cpu_divu_fix16_set (fix16_t dividend, fix16_t divisor)
 Perform a fixed-point bit division operation.
 
static uint8_t cpu_divu_interrupt_priority_get (void)
 Obtain the interrupt priority level for CPU-DIVU.
 
static void cpu_divu_interrupt_priority_set (uint8_t priority)
 Set the interrupt priority level for CPU-DIVU.
 

Detailed Description

Description goes here.

Typedef Documentation

◆ cpu_divu_ihr_t

typedef void(* cpu_divu_ihr_t) (void)

Callback type.

See also
cpu_divu_ovfi_set

Function Documentation

◆ cpu_divu_status_get()

static bool cpu_divu_status_get ( void  )
inlinestatic

Determine if an overflow has occurred.

Returns
true if an overflow has occurred. Otherwise, false.

◆ cpu_divu_quotient_get()

static uint32_t cpu_divu_quotient_get ( void  )
inlinestatic

Obtain the quotient part at the end of a division operation.

Returns
The quotient.

◆ cpu_divu_remainder_get()

static uint32_t cpu_divu_remainder_get ( void  )
inlinestatic

Obtain the remainder part at the end of a division operation.

Returns
The remainder.

◆ cpu_divu_64_32_set()

static void cpu_divu_64_32_set ( uint32_t  dividendh,
uint32_t  dividendl,
uint32_t  divisor 
)
inlinestatic

Perform a 64÷32 bit division operation.

The results are fetched using cpu_divu_quotient_get.

Parameters
dividendh,dividendlThe dividend.
divisorThe divisor.

◆ cpu_divu_32_32_set()

static void cpu_divu_32_32_set ( uint32_t  dividend,
uint32_t  divisor 
)
inlinestatic

Perform a 32÷32 bit division operation.

The results are fetched using cpu_divu_quotient_get.

Parameters
dividendThe dividend.
divisorThe divisor.

◆ cpu_divu_fix16_split()

static void cpu_divu_fix16_split ( fix16_t  dividend,
uint32_t dh,
uint32_t dl 
)
inlinestatic

Split a fix16_t value into two 32-bit parts of the dividend.

Both dh and dl must not be NULL.

Parameters
[in]dividendThe dividend to be split.
[out]dh,dlThe upper and lower 32-bits of the dividend, respectively.

◆ cpu_divu_fix16_set()

static void cpu_divu_fix16_set ( fix16_t  dividend,
fix16_t  divisor 
)
inlinestatic

Perform a fixed-point bit division operation.

The results are fetched using cpu_divu_quotient_get. Cast to fix16_t.

Parameters
dividendThe dividend.
divisorThe divisor.

◆ cpu_divu_interrupt_priority_get()

static uint8_t cpu_divu_interrupt_priority_get ( void  )
inlinestatic

Obtain the interrupt priority level for CPU-DIVU.

Returns
The interrupt priority level ranging from 0 to 15.

◆ cpu_divu_interrupt_priority_set()

static void cpu_divu_interrupt_priority_set ( uint8_t  priority)
inlinestatic

Set the interrupt priority level for CPU-DIVU.

Parameters
priorityThe priority ranging from 0 to 15.