MityDSP Documentation Index

MityDSP::tcDspFirmware Class Reference

Static class to provide access to core-independent features of the MityDSP firmware. More...

#include <core/DspFirmware.h>

List of all members.

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.

Detailed Description

Static class to provide access to core-independent features of the MityDSP firmware.

See also:
tcDspFirmware Page

Member Function Documentation

void tcDspFirmware::set_firmware_base ( void *  apBaseAddr  )  [static]

This routine sets the firmware base address to something other than the default value.

Parameters:
[in] apBaseAddr The new firmware base address.
Returns:
None.
void * tcDspFirmware::get_firmware_base ( void   )  [static]

This routine returns the current firmware base address.

Returns:
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.

Parameters:
[in] anValue Values to be written to LED Enable (1 = "On").
[in] anMask Mask specifying the bits to be modified.
Returns:
None.
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".

Returns:
Current LED Enable Register contents.
unsigned int tcDspFirmware::global_int_enable ( unsigned int  anMask  )  [static]

This routine adds the specified mask into the global interrupt enable register.

Parameters:
[in] anMask New interrupt mask to OR into the register.
Returns:
Resulting GIE setting.
unsigned int tcDspFirmware::global_int_disable ( unsigned int  anMask  )  [static]

This routine removes the specified mask into the global interrupt enable register.

Parameters:
[in] anMask New interrupt mask to ~AND into the register.
Returns:
Resulting GIE setting.
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.

Parameters:
[in] anLevel The desired interrupt level (4-7).
Returns:
Current Vector Mask Register contents.
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.

Parameters:
[in] anLevel The desired interrupt level (4-7).
[in] anMask The bits in the VMSK to be cleared.
Returns:
Vector Mask Register contents (prior to clearing).
unsigned int tcDspFirmware::snapshot_vector_register ( int  anLevel  )  [static]

This routine retrieves the specified Vector Mask Register contents, and immediately clears the pending vectors.

Parameters:
[in] anLevel The desired interrupt level (4-7).
Returns:
Vector Mask Register contents (prior to clearing).
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.

Parameters:
[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.
Returns:
None.
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.

Parameters:
[in] apCoreAddr Firmware core base address.
Returns:
Firmware version structure (0xFFFFFFFF if invalid).
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.

Parameters:
[in] apCoreAddr Firmware core base address.
Returns:
Interrupt Information structure (0xFFFFFFFF if invalid).
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.

Parameters:
[in] apCoreAddr Firmware core base address.
[out] apString Address to write resulting string.
[in] anMaxLen Number of bytes of space in apString.
Returns:
None.
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.

Parameters:
[in] apCoreAddr Firmware core base address.
Returns:
None.
unsigned int tcDspFirmware::get_emif_clock ( void   )  [static]

This routine reports the EMIF clock speed in Hz.

Returns:
EMIF clock speed.
unsigned int tcDspFirmware::get_cpu_clock ( void   )  [static]

This routine reports the CPU clock speed in Hz.

Returns:
CPU clock speed.
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.

Parameters:
[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.
Returns:
Number of longwords actually written to scratchpad.
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.

Parameters:
[out] apString Address to write resulting string.
[in] anMaxLen Number of bytes of space in apString.
Returns:
None.

Member Data Documentation

const char * tcDspFirmware::gsCoreNames = CORE_NAME_INITIALIZER [static]

Names of all known cores.


  
Generated on Fri Sep 23 16:33:49 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.