Functions | |
void | MPY32_setWriteDelay (uint16_t writeDelaySelect) |
Sets the write delay setting for the MPY32 module. More... | |
void | MPY32_enableSaturationMode (void) |
Enables Saturation Mode. More... | |
void | MPY32_disableSaturationMode (void) |
Disables Saturation Mode. More... | |
uint8_t | MPY32_getSaturationMode (void) |
Gets the Saturation Mode. More... | |
void | MPY32_enableFractionalMode (void) |
Enables Fraction Mode. More... | |
void | MPY32_disableFractionalMode (void) |
Disables Fraction Mode. More... | |
uint8_t | MPY32_getFractionalMode (void) |
Gets the Fractional Mode. More... | |
void | MPY32_setOperandOne8Bit (uint8_t multiplicationType, uint8_t operand) |
Sets an 8-bit value into operand 1. More... | |
void | MPY32_setOperandOne16Bit (uint8_t multiplicationType, uint16_t operand) |
Sets an 16-bit value into operand 1. More... | |
void | MPY32_setOperandOne24Bit (uint8_t multiplicationType, uint32_t operand) |
Sets an 24-bit value into operand 1. More... | |
void | MPY32_setOperandOne32Bit (uint8_t multiplicationType, uint32_t operand) |
Sets an 32-bit value into operand 1. More... | |
void | MPY32_setOperandTwo8Bit (uint8_t operand) |
Sets an 8-bit value into operand 2, which starts the multiplication. More... | |
void | MPY32_setOperandTwo16Bit (uint16_t operand) |
Sets an 16-bit value into operand 2, which starts the multiplication. More... | |
void | MPY32_setOperandTwo24Bit (uint32_t operand) |
Sets an 24-bit value into operand 2, which starts the multiplication. More... | |
void | MPY32_setOperandTwo32Bit (uint32_t operand) |
Sets an 32-bit value into operand 2, which starts the multiplication. More... | |
uint64_t | MPY32_getResult (void) |
Returns an 64-bit result of the last multiplication operation. More... | |
uint16_t | MPY32_getSumExtension (void) |
Returns the Sum Extension of the last multiplication operation. More... | |
uint16_t | MPY32_getCarryBitValue (void) |
Returns the Carry Bit of the last multiplication operation. More... | |
void | MPY32_clearCarryBitValue (void) |
Clears the Carry Bit of the last multiplication operation. More... | |
void | MPY32_preloadResult (uint64_t result) |
Preloads the result register. More... | |
void MPY32_clearCarryBitValue | ( | void | ) |
Clears the Carry Bit of the last multiplication operation.
This function clears the Carry Bit of the MPY module
void MPY32_disableFractionalMode | ( | void | ) |
Disables Fraction Mode.
This function disables fraction mode.
void MPY32_disableSaturationMode | ( | void | ) |
Disables Saturation Mode.
This function disables saturation mode, which allows the raw result of the MPY result registers to be returned.
void MPY32_enableFractionalMode | ( | void | ) |
Enables Fraction Mode.
This function enables fraction mode.
void MPY32_enableSaturationMode | ( | void | ) |
Enables Saturation Mode.
This function enables saturation mode. When this is enabled, the result read out from the MPY result registers is converted to the most-positive number in the case of an overflow, or the most-negative number in the case of an underflow. Please note, that the raw value in the registers does not reflect the result returned, and if the saturation mode is disabled, then the raw value of the registers will be returned instead.
uint16_t MPY32_getCarryBitValue | ( | void | ) |
Returns the Carry Bit of the last multiplication operation.
This function returns the Carry Bit of the MPY module, which either gives the sign after a signed operation or shows a carry after a multiply- and- accumulate operation.
uint8_t MPY32_getFractionalMode | ( | void | ) |
Gets the Fractional Mode.
This function gets the current fractional mode.
uint64_t MPY32_getResult | ( | void | ) |
Returns an 64-bit result of the last multiplication operation.
This function returns all 64 bits of the result registers
uint8_t MPY32_getSaturationMode | ( | void | ) |
Gets the Saturation Mode.
This function gets the current saturation mode.
uint16_t MPY32_getSumExtension | ( | void | ) |
Returns the Sum Extension of the last multiplication operation.
This function returns the Sum Extension of the MPY module, which either gives the sign after a signed operation or shows a carry after a multiply- and-accumulate operation. The Sum Extension acts as a check for overflows or underflows.
void MPY32_preloadResult | ( | uint64_t | result | ) |
Preloads the result register.
This function Preloads the result register
result | value to preload the result register to |
void MPY32_setOperandOne16Bit | ( | uint8_t | multiplicationType, |
uint16_t | operand | ||
) |
Sets an 16-bit value into operand 1.
This function sets the first operand for multiplication and determines what type of operation should be performed. Once the second operand is set, then the operation will begin.
multiplicationType | is the type of multiplication to perform once the second operand is set. Valid values are:
|
operand | is the 16-bit value to load into the 1st operand. |
void MPY32_setOperandOne24Bit | ( | uint8_t | multiplicationType, |
uint32_t | operand | ||
) |
Sets an 24-bit value into operand 1.
This function sets the first operand for multiplication and determines what type of operation should be performed. Once the second operand is set, then the operation will begin.
multiplicationType | is the type of multiplication to perform once the second operand is set. Valid values are:
|
operand | is the 24-bit value to load into the 1st operand. |
void MPY32_setOperandOne32Bit | ( | uint8_t | multiplicationType, |
uint32_t | operand | ||
) |
Sets an 32-bit value into operand 1.
This function sets the first operand for multiplication and determines what type of operation should be performed. Once the second operand is set, then the operation will begin.
multiplicationType | is the type of multiplication to perform once the second operand is set. Valid values are:
|
operand | is the 32-bit value to load into the 1st operand. |
void MPY32_setOperandOne8Bit | ( | uint8_t | multiplicationType, |
uint8_t | operand | ||
) |
Sets an 8-bit value into operand 1.
This function sets the first operand for multiplication and determines what type of operation should be performed. Once the second operand is set, then the operation will begin.
multiplicationType | is the type of multiplication to perform once the second operand is set. Valid values are:
|
operand | is the 8-bit value to load into the 1st operand. |
void MPY32_setOperandTwo16Bit | ( | uint16_t | operand | ) |
Sets an 16-bit value into operand 2, which starts the multiplication.
This function sets the second operand of the multiplication operation and starts the operation.
operand | is the 16-bit value to load into the 2nd operand. |
void MPY32_setOperandTwo24Bit | ( | uint32_t | operand | ) |
Sets an 24-bit value into operand 2, which starts the multiplication.
This function sets the second operand of the multiplication operation and starts the operation.
operand | is the 24-bit value to load into the 2nd operand. |
void MPY32_setOperandTwo32Bit | ( | uint32_t | operand | ) |
Sets an 32-bit value into operand 2, which starts the multiplication.
This function sets the second operand of the multiplication operation and starts the operation.
operand | is the 32-bit value to load into the 2nd operand. |
void MPY32_setOperandTwo8Bit | ( | uint8_t | operand | ) |
Sets an 8-bit value into operand 2, which starts the multiplication.
This function sets the second operand of the multiplication operation and starts the operation.
operand | is the 8-bit value to load into the 2nd operand. |
void MPY32_setWriteDelay | ( | uint16_t | writeDelaySelect | ) |
Sets the write delay setting for the MPY32 module.
This function sets up a write delay to the MPY module's registers, which holds any writes to the registers until all calculations are complete. There are two different settings, one which waits for 32-bit results to be ready, and one which waits for 64-bit results to be ready. This prevents unpredicatble results if registers are changed before the results are ready.
writeDelaySelect | delays the write to any MPY32 register until the selected bit size of result has been written. Valid values are:
|