CP_SetDivImm*


C Specification

#include <nitro/cp.h>

void CP_SetDivImm32_32( u32 numer, u32 denom );
void CP_SetDivImm64_32( u64 numer, u32 denom );
void CP_SetDivImm64_64( u64 numer, u64 denom );

Description

This function sets the parameters for division. It does not set the division mode but merely stores the dividend and the divisor in registers. The three division modes are shown below.

Division Mode Calculation Results
CP_DIV_32_32BIT_MODE 32-bit divided by 32-bit 32-bit quotient, 32-bit remainder
CP_DIV_64_32BIT_MODE 64-bit divided by 32-bit 64-bit quotient, 32-bit remainder
CP_DIV_64_64BIT_MODE 64-bit divided by 64-bit 64-bit quotient, 64-bit remainder

Internal Operation

Stores values in DIV_NUMER(0x4000290) and DIV_DENOM(0x4000298) of the IO register.

Arguments

numer Numerator of the fraction. Represents the dividend for division
denom Denominator of the fraction. Represents the divisor for division

Return Values

None

See Also

CP_SetDiv*, CP_IsDivBusy, CP_WaitDiv, CP_GetDivResult*, CP_GetDivRemainder*

Revision History

11/02/2004 Corrected IO register address in Internal Operation.
01/09/2004 Added content.
12/01/2003 Initial version.