Static class to provide access to core-independent features of the MityDSP firmware. More...
#include <core/DspFirmware.h>
Static Public Member Functions | |
static void | set_firmware_base (void *apBaseAddr) |
This routine sets the firmware base address to something other than the default value. | |
static void * | get_firmware_base (void) |
This routine returns the current firmware base address. | |
static void | set_led_state (unsigned int anValue, unsigned int anMask=0xFFFFFFFF) |
This routine sets the bits in the LED Enable Register specified by the anMask to the values specified by anValue. | |
static unsigned int | get_led_state (void) |
This routine retrieves the current LED Enable Register contents. | |
static unsigned int | global_int_enable (unsigned int anMask) |
This routine adds the specified mask into the global interrupt enable register. | |
static unsigned int | global_int_disable (unsigned int anMask) |
This routine removes the specified mask into the global interrupt enable register. | |
static unsigned int | read_vector_register (int anLevel) |
This routine retrieves the specified Vector Mask Register contents. | |
static void | clear_vector_register (int anLevel, unsigned int anMask) |
This routine clears (acknowledges) the pending interrupts for the vectors specified by the provided mask. | |
static unsigned int | snapshot_vector_register (int anLevel) |
This routine retrieves the specified Vector Mask Register contents, and immediately clears the pending vectors. | |
static void | set_vector_enable (int anLevel, unsigned int anMask, bool abSet) |
This routine sets of clears the specified vector enable bits in the vector enable register. | |
static tuFirmwareVersion | get_version_info (void *apCoreAddr) |
This routine returns the version register for the specified core. | |
static tuInterruptInfo | get_interrupt_info (void *apCoreAddr) |
This routine returns the interrupt information register for the specified core. | |
static void | print_version_info (void *apCoreAddr, char *apString=(char *) NULL, int anMaxLen=0) |
This routine prints the version register for the specified core to the specified string. | |
static void | report_version_info (void *apCoreAddr) |
This routine reports the version register information for the specified using DspError. | |
static unsigned int | get_emif_clock (void) |
This routine reports the EMIF clock speed in Hz. | |
static unsigned int | get_cpu_clock (void) |
This routine reports the CPU clock speed in Hz. | |
static int | write_scratchpad (const void *apData, int anOffset, int anLength) |
This routine allows an application to write data to the FPGA scratchpad memory. | |
static void | print_bootstrap_info (char *apString=(char *) NULL, int anMaxLen=0) |
This routine prints the Bootstrapper version information to the specified string. | |
Static Public Attributes | |
static const char * | gsCoreNames [NUM_CORE_IDS] = CORE_NAME_INITIALIZER |
Names of all known cores. |
Static class to provide access to core-independent features of the MityDSP firmware.
void tcDspFirmware::set_firmware_base | ( | void * | apBaseAddr | ) | [static] |
This routine sets the firmware base address to something other than the default value.
[in] | apBaseAddr | The new firmware base address. |
void * tcDspFirmware::get_firmware_base | ( | void | ) | [static] |
This routine returns the current firmware base address.
void tcDspFirmware::set_led_state | ( | unsigned int | anValue, | |
unsigned int | anMask = 0xFFFFFFFF | |||
) | [static] |
This routine sets the bits in the LED Enable Register specified by the anMask to the values specified by anValue.
The default mask is 0xFFFFFFFF.
[in] | anValue | Values to be written to LED Enable (1 = "On"). |
[in] | anMask | Mask specifying the bits to be modified. |
unsigned int tcDspFirmware::get_led_state | ( | void | ) | [static] |
This routine retrieves the current LED Enable Register contents.
Bits set to "1" indicate an LED that is "On".
unsigned int tcDspFirmware::global_int_enable | ( | unsigned int | anMask | ) | [static] |
This routine adds the specified mask into the global interrupt enable register.
[in] | anMask | New interrupt mask to OR into the register. |
unsigned int tcDspFirmware::global_int_disable | ( | unsigned int | anMask | ) | [static] |
This routine removes the specified mask into the global interrupt enable register.
[in] | anMask | New interrupt mask to ~AND into the register. |
unsigned int tcDspFirmware::read_vector_register | ( | int | anLevel | ) | [static] |
This routine retrieves the specified Vector Mask Register contents.
Each bit position corresponds to an interrupt vector (0-31). If a vector's bit is set to 1, a condition for the device associated with that vector needs to be serviced.
[in] | anLevel | The desired interrupt level (4-7). |
void tcDspFirmware::clear_vector_register | ( | int | anLevel, | |
unsigned int | anMask | |||
) | [static] |
This routine clears (acknowledges) the pending interrupts for the vectors specified by the provided mask.
[in] | anLevel | The desired interrupt level (4-7). |
[in] | anMask | The bits in the VMSK to be cleared. |
unsigned int tcDspFirmware::snapshot_vector_register | ( | int | anLevel | ) | [static] |
This routine retrieves the specified Vector Mask Register contents, and immediately clears the pending vectors.
[in] | anLevel | The desired interrupt level (4-7). |
void tcDspFirmware::set_vector_enable | ( | int | anLevel, | |
unsigned int | anMask, | |||
bool | abSet | |||
) | [static] |
This routine sets of clears the specified vector enable bits in the vector enable register.
Vectored interrupts will only be generated if the specified vector bit (for the given level) is set.
[in] | anLevel | The desired interrupt level (4-7). |
[in] | anMask | The bits in the VMSK to be cleared (0x00-0xFF). |
[in] | abSet | Set the bit if true, clear it otherwise. |
tuFirmwareVersion tcDspFirmware::get_version_info | ( | void * | apCoreAddr | ) | [static] |
This routine returns the version register for the specified core.
If the core address is NULL, the overall firmware version is returned.
[in] | apCoreAddr | Firmware core base address. |
tuInterruptInfo tcDspFirmware::get_interrupt_info | ( | void * | apCoreAddr | ) | [static] |
This routine returns the interrupt information register for the specified core.
The interrupt information is retrieved by reading the version register one additional time after successfully getting the version information. This information does not apply to the base firmware address.
[in] | apCoreAddr | Firmware core base address. |
void tcDspFirmware::print_version_info | ( | void * | apCoreAddr, | |
char * | apString = (char *)NULL , |
|||
int | anMaxLen = 0 | |||
) | [static] |
This routine prints the version register for the specified core to the specified string.
If the core address is NULL, the overall firmware version is returned. If no string is supplied, the version is output via stdout.
[in] | apCoreAddr | Firmware core base address. |
[out] | apString | Address to write resulting string. |
[in] | anMaxLen | Number of bytes of space in apString. |
void tcDspFirmware::report_version_info | ( | void * | apCoreAddr | ) | [static] |
This routine reports the version register information for the specified using DspError.
If the core address is NULL, the overall firmware version is returned.
[in] | apCoreAddr | Firmware core base address. |
unsigned int tcDspFirmware::get_emif_clock | ( | void | ) | [static] |
This routine reports the EMIF clock speed in Hz.
unsigned int tcDspFirmware::get_cpu_clock | ( | void | ) | [static] |
This routine reports the CPU clock speed in Hz.
int tcDspFirmware::write_scratchpad | ( | const void * | apData, | |
int | anOffset, | |||
int | anLength | |||
) | [static] |
This routine allows an application to write data to the FPGA scratchpad memory.
[in] | apData | Pointer to the data to write. |
[in] | anOffset | Longword offset in the scratchpad to write to. |
[in] | anLength | Longwords of data to be written. |
void tcDspFirmware::print_bootstrap_info | ( | char * | apString = (char *)NULL , |
|
int | anMaxLen = 0 | |||
) | [static] |
This routine prints the Bootstrapper version information to the specified string.
If no string is supplied, the version is output via stdout.
[out] | apString | Address to write resulting string. |
[in] | anMaxLen | Number of bytes of space in apString. |
const char * tcDspFirmware::gsCoreNames = CORE_NAME_INITIALIZER [static] |
Names of all known cores.