common
Xilinx SDK Drivers API Documentation
Common_v1_00_a

Data Structures

struct  XENV_TIME_STAMP
 A structure that contains a time stamp used by other time stamp macros defined below. More...
 

Macros

#define XNULL   NULL
 Xilinx NULL, TRUE and FALSE legacy support. More...
 
#define XCOMPONENT_IS_READY   0x11111111
 component has been initialized More...
 
#define XCOMPONENT_IS_STARTED   0x22222222
 component has been started More...
 
#define XUINT64_MSW(x)   ((x).Upper)
 Return the most significant half of the 64 bit data type. More...
 
#define XUINT64_LSW(x)   ((x).Lower)
 Return the least significant half of the 64 bit data type. More...
 
#define XASSERT_VOID(expression)
 This assert macro is to be used for functions that do not return anything (void). More...
 
#define XASSERT_NONVOID(expression)
 This assert macro is to be used for functions that do return a value. More...
 
#define XASSERT_VOID_ALWAYS()
 Always assert. More...
 
#define XASSERT_NONVOID_ALWAYS()
 Always assert. More...
 
#define XENV_MEM_COPY(DestPtr, SrcPtr, Bytes)   memcpy(DestPtr, SrcPtr, Bytes)
 Copies a non-overlapping block of memory. More...
 
#define XENV_MEM_FILL(DestPtr, Data, Bytes)   memset(DestPtr, Data, Bytes)
 Fills an area of memory with constant data. More...
 
#define XENV_TIME_STAMP_GET(StampPtr)
 Time is derived from the 64 bit PPC timebase register. More...
 
#define XENV_TIME_STAMP_DELTA_US(Stamp1Ptr, Stamp2Ptr)   (0)
 This macro is not yet implemented and always returns 0. More...
 
#define XENV_TIME_STAMP_DELTA_MS(Stamp1Ptr, Stamp2Ptr)   (0)
 This macro is not yet implemented and always returns 0. More...
 
#define XENV_USLEEP(delay)   udelay(delay)
 Delay the specified number of microseconds. More...
 
#define XENV_MEM_COPY(DestPtr, SrcPtr, Bytes)   memcpy((void *) DestPtr, (const void *) SrcPtr, (size_t) Bytes)
 Copies a non-overlapping block of memory. More...
 
#define XENV_MEM_FILL(DestPtr, Data, Bytes)   memset((void *) DestPtr, (int) Data, (size_t) Bytes)
 Fills an area of memory with constant data. More...
 
#define XENV_TIME_STAMP_GET(StampPtr)
 Time is derived from the 64 bit PPC timebase register. More...
 
#define XENV_TIME_STAMP_DELTA_US(Stamp1Ptr, Stamp2Ptr)   (0)
 This macro is not yet implemented and always returns 0. More...
 
#define XENV_TIME_STAMP_DELTA_MS(Stamp1Ptr, Stamp2Ptr)   (0)
 This macro is not yet implemented and always returns 0. More...
 
#define XENV_USLEEP(delay)
 XENV_USLEEP(unsigned delay) More...
 
#define XENV_MEM_COPY(DestPtr, SrcPtr, Bytes)   memcpy((void *) DestPtr, (const void *) SrcPtr, (size_t) Bytes)
 Copies a non-overlapping block of memory. More...
 
#define XENV_MEM_FILL(DestPtr, Data, Bytes)   memset((void *) DestPtr, (int) Data, (size_t) Bytes)
 Fills an area of memory with constant data. More...
 
#define XENV_TIME_STAMP_GET(StampPtr)
 Time is derived from the 64 bit PPC timebase register. More...
 
#define XENV_TIME_STAMP_DELTA_US(Stamp1Ptr, Stamp2Ptr)   (0)
 This macro is not yet implemented and always returns 0. More...
 
#define XENV_TIME_STAMP_DELTA_MS(Stamp1Ptr, Stamp2Ptr)   (0)
 This macro is not yet implemented and always returns 0. More...
 
#define XENV_USLEEP(delay)   sysUsDelay(delay)
 Delay the specified number of microseconds. More...
 

Typedefs

typedef void(* XInterruptHandler) (void *InstancePtr)
 This data type defines an interrupt handler for a device. More...
 
typedef void(* XExceptionHandler) (void *InstancePtr)
 This data type defines an exception handler for a processor. More...
 
typedef void(* XAssertCallback) (char *FilenamePtr, int LineNumber)
 This data type defines a callback to be invoked when an assert occurs. More...
 
typedef int XENV_TIME_STAMP
 A structure that contains a time stamp used by other time stamp macros defined below. More...
 
typedef int XENV_TIME_STAMP
 A structure that contains a time stamp used by other time stamp macros defined below. More...
 

Functions

void XAssert (char *File, int Line)
 Implements assert. More...
 
void XAssertSetCallback (XAssertCallback Routine)
 Sets up a callback function to be invoked when an assert occurs. More...
 
void XNullHandler (void *NullParameter)
 Null handler function. More...
 
int XUtil_MemoryTest32 (u32 *Addr, u32 Words, u32 Pattern, u8 Subtest)
 Performs a destructive 32-bit wide memory test. More...
 
int XUtil_MemoryTest16 (u16 *Addr, u32 Words, u16 Pattern, u8 Subtest)
 Performs a destructive 16-bit wide memory test. More...
 
int XUtil_MemoryTest8 (u8 *Addr, u32 Words, u8 Pattern, u8 Subtest)
 Performs a destructive 8-bit wide memory test. More...
 
void XVersion_UnPack (XVersion *InstancePtr, u16 PackedVersion)
 Unpacks a packed version into the specified version. More...
 
int XVersion_Pack (XVersion *InstancePtr, u16 *PackedVersionPtr)
 Packs a version into the specified packed version. More...
 
int XVersion_IsEqual (XVersion *InstancePtr, XVersion *VersionPtr)
 Determines if two versions are equal. More...
 
void XVersion_ToString (XVersion *InstancePtr, char *StringPtr)
 Converts a version to a null terminated string. More...
 
int XVersion_FromString (XVersion *InstancePtr, char *StringPtr)
 Initializes a version from a null terminated string. More...
 
void XVersion_Copy (XVersion *InstancePtr, XVersion *VersionPtr)
 Copies the contents of a version to another version. More...
 

Variables

unsigned int XAssertStatus
 This variable allows testing to be done easier with asserts. More...
 
int XWaitInAssert = TRUE
 This variable allows the assert functionality to be changed for testing such that it does not wait infinitely. More...
 
unsigned int XAssertStatus
 This variable allows testing to be done easier with asserts. More...
 

Legacy types

Deprecated legacy types.

typedef unsigned char Xuint8
 unsigned 8-bit More...
 
typedef char Xint8
 signed 8-bit More...
 
typedef unsigned short Xuint16
 unsigned 16-bit More...
 
typedef short Xint16
 signed 16-bit More...
 
typedef unsigned long Xuint32
 unsigned 32-bit More...
 
typedef long Xint32
 signed 32-bit More...
 
typedef float Xfloat32
 32-bit floating point More...
 
typedef double Xfloat64
 64-bit double precision FP More...
 
typedef unsigned long Xboolean
 boolean (XTRUE or XFALSE) More...
 

New types

New simple types.

typedef Xuint32 u32
 
typedef Xuint16 u16
 
typedef Xuint8 u8
 

Memory subtests

#define XUT_ALLMEMTESTS   0
 See the detailed description of the subtests in the file description. More...
 
#define XUT_INCREMENT   1
 
#define XUT_WALKONES   2
 
#define XUT_WALKZEROS   3
 
#define XUT_INVERSEADDR   4
 
#define XUT_FIXEDPATTERN   5
 
#define XUT_MAXTEST   XUT_FIXEDPATTERN
 

Macro Definition Documentation

◆ XASSERT_NONVOID

#define XASSERT_NONVOID (   expression)

#include <xbasic_types.h>

Value:
{ \
if (expression) \
{ \
XAssertStatus = XASSERT_NONE; \
} \
else \
{ \
XAssert(__FILE__, __LINE__); \
XAssertStatus = XASSERT_OCCURRED; \
return 0; \
} \
}

This assert macro is to be used for functions that do return a value.

This in conjunction with the XWaitInAssert boolean can be used to accomodate tests so that asserts which fail allow execution to continue.

Parameters
expressionis the expression to evaluate. If it evaluates to false, the assert occurs.
Returns
Returns 0 unless the XWaitInAssert variable is true, in which case no return is made and an infinite loop is entered.
Note
None.

◆ XASSERT_NONVOID_ALWAYS

#define XASSERT_NONVOID_ALWAYS ( )

#include <xbasic_types.h>

Value:
{ \
XAssert(__FILE__, __LINE__); \
XAssertStatus = XASSERT_OCCURRED; \
return 0; \
}

Always assert.

This assert macro is to be used for functions that do return a value. Use for instances where an assert should always occur.

Returns
Returns void unless the XWaitInAssert variable is true, in which case no return is made and an infinite loop is entered.
Note
None.

◆ XASSERT_VOID

#define XASSERT_VOID (   expression)

#include <xbasic_types.h>

Value:
{ \
if (expression) \
{ \
XAssertStatus = XASSERT_NONE; \
} \
else \
{ \
XAssert(__FILE__, __LINE__); \
XAssertStatus = XASSERT_OCCURRED; \
return; \
} \
}

This assert macro is to be used for functions that do not return anything (void).

This in conjunction with the XWaitInAssert boolean can be used to accomodate tests so that asserts which fail allow execution to continue.

Parameters
expressionis the expression to evaluate. If it evaluates to false, the assert occurs.
Returns
Returns void unless the XWaitInAssert variable is true, in which case no return is made and an infinite loop is entered.
Note
None.

◆ XASSERT_VOID_ALWAYS

#define XASSERT_VOID_ALWAYS ( )

#include <xbasic_types.h>

Value:
{ \
XAssert(__FILE__, __LINE__); \
XAssertStatus = XASSERT_OCCURRED; \
return; \
}

Always assert.

This assert macro is to be used for functions that do not return anything (void). Use for instances where an assert should always occur.

Returns
Returns void unless the XWaitInAssert variable is true, in which case no return is made and an infinite loop is entered.
Note
None.

◆ XCOMPONENT_IS_READY

#define XCOMPONENT_IS_READY   0x11111111

#include <xbasic_types.h>

component has been initialized

◆ XCOMPONENT_IS_STARTED

#define XCOMPONENT_IS_STARTED   0x22222222

#include <xbasic_types.h>

component has been started

◆ XENV_MEM_COPY [1/3]

#define XENV_MEM_COPY (   DestPtr,
  SrcPtr,
  Bytes 
)    memcpy((void *) DestPtr, (const void *) SrcPtr, (size_t) Bytes)

#include <xenv_vxworks.h>

Copies a non-overlapping block of memory.

Parameters
DestPtrDestination address to copy data to.
SrcPtrSource address to copy data from.
BytesNumber of bytes to copy.
Returns
None.
Note
XENV_MEM_COPY is deprecated. Use memcpy() instead.

◆ XENV_MEM_COPY [2/3]

#define XENV_MEM_COPY (   DestPtr,
  SrcPtr,
  Bytes 
)    memcpy(DestPtr, SrcPtr, Bytes)

#include <xenv_linux.h>

Copies a non-overlapping block of memory.

Parameters
DestPtrDestination address to copy data to.
SrcPtrSource address to copy data from.
BytesNumber of bytes to copy.
Returns
None.

◆ XENV_MEM_COPY [3/3]

#define XENV_MEM_COPY (   DestPtr,
  SrcPtr,
  Bytes 
)    memcpy((void *) DestPtr, (const void *) SrcPtr, (size_t) Bytes)

#include <xenv_standalone.h>

Copies a non-overlapping block of memory.

Parameters
DestPtrDestination address to copy data to.
SrcPtrSource address to copy data from.
BytesNumber of bytes to copy.
Returns
None.
Note
The use of XENV_MEM_COPY is deprecated. Use memcpy() instead.
This implemention MAY BREAK work if source and target memory area are overlapping.

◆ XENV_MEM_FILL [1/3]

#define XENV_MEM_FILL (   DestPtr,
  Data,
  Bytes 
)    memset((void *) DestPtr, (int) Data, (size_t) Bytes)

#include <xenv_vxworks.h>

Fills an area of memory with constant data.

Parameters
DestPtrDestination address to copy data to.
DataValue to set.
BytesNumber of bytes to copy.
Returns
None.
Note
XENV_MEM_FILL is deprecated. Use memset() instead.

◆ XENV_MEM_FILL [2/3]

#define XENV_MEM_FILL (   DestPtr,
  Data,
  Bytes 
)    memset(DestPtr, Data, Bytes)

#include <xenv_linux.h>

Fills an area of memory with constant data.

Parameters
DestPtrDestination address to copy data to.
DataValue to set.
BytesNumber of bytes to copy.
Returns
None.

◆ XENV_MEM_FILL [3/3]

#define XENV_MEM_FILL (   DestPtr,
  Data,
  Bytes 
)    memset((void *) DestPtr, (int) Data, (size_t) Bytes)

#include <xenv_standalone.h>

Fills an area of memory with constant data.

Parameters
DestPtrDestination address to copy data to.
DataValue to set.
BytesNumber of bytes to copy.
Returns
None.
Note
The use of XENV_MEM_FILL is deprecated. Use memset() instead.

◆ XENV_TIME_STAMP_DELTA_MS [1/3]

#define XENV_TIME_STAMP_DELTA_MS (   Stamp1Ptr,
  Stamp2Ptr 
)    (0)

#include <xenv_vxworks.h>

This macro is not yet implemented and always returns 0.

Parameters
Stamp1Ptris the first sampled time stamp.
Stamp2Ptris the second sampled time stamp.
Returns
0
Note

None.

◆ XENV_TIME_STAMP_DELTA_MS [2/3]

#define XENV_TIME_STAMP_DELTA_MS (   Stamp1Ptr,
  Stamp2Ptr 
)    (0)

#include <xenv_linux.h>

This macro is not yet implemented and always returns 0.

Parameters
Stamp1Ptris the first sampled time stamp.
Stamp2Ptris the second sampled time stamp.
Returns
0
Note

This macro must be implemented by the user

◆ XENV_TIME_STAMP_DELTA_MS [3/3]

#define XENV_TIME_STAMP_DELTA_MS (   Stamp1Ptr,
  Stamp2Ptr 
)    (0)

#include <xenv_standalone.h>

This macro is not yet implemented and always returns 0.

Parameters
Stamp1Ptris the first sampled time stamp.
Stamp2Ptris the second sampled time stamp.
Returns
0
Note

This macro must be implemented by the user.

◆ XENV_TIME_STAMP_DELTA_US [1/3]

#define XENV_TIME_STAMP_DELTA_US (   Stamp1Ptr,
  Stamp2Ptr 
)    (0)

#include <xenv_vxworks.h>

This macro is not yet implemented and always returns 0.

Parameters
Stamp1Ptris the first sampled time stamp.
Stamp2Ptris the second sampled time stamp.
Returns
0
Note
None.

◆ XENV_TIME_STAMP_DELTA_US [2/3]

#define XENV_TIME_STAMP_DELTA_US (   Stamp1Ptr,
  Stamp2Ptr 
)    (0)

#include <xenv_linux.h>

This macro is not yet implemented and always returns 0.

Parameters
Stamp1Ptris the first sampled time stamp.
Stamp2Ptris the second sampled time stamp.
Returns
0
Note

This macro must be implemented by the user.

◆ XENV_TIME_STAMP_DELTA_US [3/3]

#define XENV_TIME_STAMP_DELTA_US (   Stamp1Ptr,
  Stamp2Ptr 
)    (0)

#include <xenv_standalone.h>

This macro is not yet implemented and always returns 0.

Parameters
Stamp1Ptris the first sampled time stamp.
Stamp2Ptris the second sampled time stamp.
Returns
0
Note

This macro must be implemented by the user.

◆ XENV_TIME_STAMP_GET [1/3]

#define XENV_TIME_STAMP_GET (   StampPtr)

#include <xenv_vxworks.h>

Value:
{ \
vxTimeBaseGet((UINT32*)&(StampPtr)->TimeBaseUpper, \
(UINT32*)&(StampPtr)->TimeBaseLower); \
}

Time is derived from the 64 bit PPC timebase register.

Parameters
StampPtris the storage for the retrieved time stamp.
Returns
None.
Note

Signature: void XENV_TIME_STAMP_GET(XTIME_STAMP *StampPtr)

◆ XENV_TIME_STAMP_GET [2/3]

#define XENV_TIME_STAMP_GET (   StampPtr)

#include <xenv_linux.h>

Time is derived from the 64 bit PPC timebase register.

Parameters
StampPtris the storage for the retrieved time stamp.
Returns
None.
Note

Signature: void XENV_TIME_STAMP_GET(XTIME_STAMP *StampPtr)

This macro must be implemented by the user.

◆ XENV_TIME_STAMP_GET [3/3]

#define XENV_TIME_STAMP_GET (   StampPtr)

#include <xenv_standalone.h>

Time is derived from the 64 bit PPC timebase register.

Parameters
StampPtris the storage for the retrieved time stamp.
Returns
None.
Note

Signature: void XENV_TIME_STAMP_GET(XTIME_STAMP *StampPtr)

This macro must be implemented by the user.

◆ XENV_USLEEP [1/3]

#define XENV_USLEEP (   delay)    sysUsDelay(delay)

#include <xenv_vxworks.h>

Delay the specified number of microseconds.

Parameters
delayNumber of microseconds to delay.
Returns
None.

◆ XENV_USLEEP [2/3]

#define XENV_USLEEP (   delay)    udelay(delay)

#include <xenv_linux.h>

Delay the specified number of microseconds.

Parameters
delayNumber of microseconds to delay.
Returns
None.
Note
XENV_USLEEP is deprecated. Use udelay() instead.

◆ XENV_USLEEP [3/3]

#define XENV_USLEEP (   delay)

#include <xenv_standalone.h>

XENV_USLEEP(unsigned delay)

Delay the specified number of microseconds. Not implemented without OS support.

Parameters
delayNumber of microseconds to delay.
Returns
None.

◆ XNULL

#define XNULL   NULL

#include <xbasic_types.h>

Xilinx NULL, TRUE and FALSE legacy support.

Deprecated.

◆ XUINT64_LSW

#define XUINT64_LSW (   x)    ((x).Lower)

#include <xbasic_types.h>

Return the least significant half of the 64 bit data type.

Parameters
xis the 64 bit word.
Returns
The lower 32 bits of the 64 bit word.
Note
None.

◆ XUINT64_MSW

#define XUINT64_MSW (   x)    ((x).Upper)

#include <xbasic_types.h>

Return the most significant half of the 64 bit data type.

Parameters
xis the 64 bit word.
Returns
The upper 32 bits of the 64 bit word.
Note
None.

◆ XUT_ALLMEMTESTS

#define XUT_ALLMEMTESTS   0

#include <xutil.h>

See the detailed description of the subtests in the file description.

Typedef Documentation

◆ XAssertCallback

typedef void(* XAssertCallback) (char *FilenamePtr, int LineNumber)

#include <xbasic_types.h>

This data type defines a callback to be invoked when an assert occurs.

The callback is invoked only when asserts are enabled

◆ Xboolean

typedef unsigned long Xboolean

#include <xbasic_types.h>

boolean (XTRUE or XFALSE)

◆ XENV_TIME_STAMP [1/2]

typedef int XENV_TIME_STAMP

#include <xenv_linux.h>

A structure that contains a time stamp used by other time stamp macros defined below.

This structure is processor dependent.

◆ XENV_TIME_STAMP [2/2]

typedef int XENV_TIME_STAMP

#include <xenv_standalone.h>

A structure that contains a time stamp used by other time stamp macros defined below.

This structure is processor dependent.

◆ XExceptionHandler

typedef void(* XExceptionHandler) (void *InstancePtr)

#include <xbasic_types.h>

This data type defines an exception handler for a processor.

The argument points to the instance of the component

◆ Xfloat32

typedef float Xfloat32

#include <xbasic_types.h>

32-bit floating point

◆ Xfloat64

typedef double Xfloat64

#include <xbasic_types.h>

64-bit double precision FP

◆ Xint16

typedef short Xint16

#include <xbasic_types.h>

signed 16-bit

◆ Xint32

typedef long Xint32

#include <xbasic_types.h>

signed 32-bit

◆ Xint8

typedef char Xint8

#include <xbasic_types.h>

signed 8-bit

◆ XInterruptHandler

typedef void(* XInterruptHandler) (void *InstancePtr)

#include <xbasic_types.h>

This data type defines an interrupt handler for a device.

The argument points to the instance of the component

◆ Xuint16

typedef unsigned short Xuint16

#include <xbasic_types.h>

unsigned 16-bit

◆ Xuint32

typedef unsigned long Xuint32

#include <xbasic_types.h>

unsigned 32-bit

◆ Xuint8

typedef unsigned char Xuint8

#include <xbasic_types.h>

unsigned 8-bit

Function Documentation

◆ XAssert()

void XAssert ( char *  File,
int  Line 
)

#include <xbasic_types.c>

Implements assert.

Currently, it calls a user-defined callback function if one has been set. Then, it potentially enters an infinite loop depending on the value of the XWaitInAssert variable.

Parameters
Fileis the name of the filename of the source
Lineis the linenumber within File
Returns
None.
Note
None.

◆ XAssertSetCallback()

void XAssertSetCallback ( XAssertCallback  Routine)

#include <xbasic_types.c>

Sets up a callback function to be invoked when an assert occurs.

If there was already a callback installed, then it is replaced.

Parameters
Routineis the callback to be invoked when an assert is taken
Returns
None.
Note
This function has no effect if NDEBUG is set

◆ XNullHandler()

void XNullHandler ( void *  NullParameter)

#include <xbasic_types.c>

Null handler function.

This follows the XInterruptHandler signature for interrupt handlers. It can be used to assign a null handler (a stub) to an interrupt controller vector table.

Parameters
NullParameteris an arbitrary void pointer and not used.
Returns
None.
Note
None.

◆ XUtil_MemoryTest16()

int XUtil_MemoryTest16 ( u16 *  Addr,
u32  Words,
u16  Pattern,
u8  Subtest 
)

#include <xutil.h>

Performs a destructive 16-bit wide memory test.

Parameters
Addris a pointer to the region of memory to be tested.
Wordsis the length of the block.
Patternis the constant used for the constant pattern test, if 0, 0xDEADBEEF is used.
Subtestis the test selected. See xutil.h for possible values.
Returns
  • XST_MEMTEST_FAILED is returned for a failure
  • XST_SUCCESS is returned for a pass
Note

Used for spaces where the address range of the region is smaller than the data width. If the memory range is greater than 2 ** width, the patterns used in XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_INVERSEADDR tests suffer the same problem. Ideally, if large blocks of memory are to be tested, break them up into smaller regions of memory to allow the test patterns used not to repeat over the region tested.

◆ XUtil_MemoryTest32()

int XUtil_MemoryTest32 ( u32 *  Addr,
u32  Words,
u32  Pattern,
u8  Subtest 
)

#include <xutil.h>

Performs a destructive 32-bit wide memory test.

Parameters
Addris a pointer to the region of memory to be tested.
Wordsis the length of the block.
Patternis the constant used for the constant pattern test, if 0, 0xDEADBEEF is used.
Subtestis the test selected. See xutil.h for possible values.
Returns
  • XST_MEMTEST_FAILED is returned for a failure
  • XST_SUCCESS is returned for a pass
Note

Used for spaces where the address range of the region is smaller than the data width. If the memory range is greater than 2 ** width, the patterns used in XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_INVERSEADDR tests suffer the same problem. Ideally, if large blocks of memory are to be tested, break them up into smaller regions of memory to allow the test patterns used not to repeat over the region tested.

◆ XUtil_MemoryTest8()

int XUtil_MemoryTest8 ( u8 *  Addr,
u32  Words,
u8  Pattern,
u8  Subtest 
)

#include <xutil.h>

Performs a destructive 8-bit wide memory test.

Parameters
Addris a pointer to the region of memory to be tested.
Wordsis the length of the block.
Patternis the constant used for the constant pattern test, if 0, 0xDEADBEEF is used.
Subtestis the test selected. See xutil.h for possible values.
Returns
  • XST_MEMTEST_FAILED is returned for a failure
  • XST_SUCCESS is returned for a pass
Note

Used for spaces where the address range of the region is smaller than the data width. If the memory range is greater than 2 ** width, the patterns used in XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_INVERSEADDR tests suffer the same problem. Ideally, if large blocks of memory are to be tested, break them up into smaller regions of memory to allow the test patterns used not to repeat over the region tested.

◆ XVersion_Copy()

void XVersion_Copy ( XVersion *  InstancePtr,
XVersion *  VersionPtr 
)

#include <xversion.c>

Copies the contents of a version to another version.

Parameters
InstancePtrpoints to the version which is the source of data for the copy operation.
VersionPtrpoints to another version which is the destination of the copy operation.
Returns

None.

Note

None.

◆ XVersion_FromString()

int XVersion_FromString ( XVersion *  InstancePtr,
char *  StringPtr 
)

#include <xversion.c>

Initializes a version from a null terminated string.

Since the string may not be a format which is compatible with the version, an error could occur.

Parameters
InstancePtrpoints to the version which is to be initialized.
StringPtrpoints to a null terminated string which will be converted to a version. The format of the string must match the version string format which is X.YYX where X = 0 - 9, YY = 00 - 99, Z = a - z.
Returns

A status, XST_SUCCESS, indicating the conversion was accomplished successfully, or XST_INVALID_VERSION indicating the version string format was not valid.

Note

None.

◆ XVersion_IsEqual()

int XVersion_IsEqual ( XVersion *  InstancePtr,
XVersion *  VersionPtr 
)

#include <xversion.c>

Determines if two versions are equal.

Parameters
InstancePtrpoints to the first version to be compared.
VersionPtrpoints to a second version to be compared.
Returns

TRUE if the versions are equal, FALSE otherwise.

Note

None.

◆ XVersion_Pack()

int XVersion_Pack ( XVersion *  InstancePtr,
u16 *  PackedVersionPtr 
)

#include <xversion.c>

Packs a version into the specified packed version.

Versions are packed into the configuration ROM to reduce the amount storage.

Parameters
InstancePtrpoints to the version to pack.
PackedVersionPtrpoints to the packed version which will receive the new packed version.
Returns

A status, XST_SUCCESS, indicating the packing was accomplished successfully, or an error, XST_INVALID_VERSION, indicating the specified input version was not valid such that the pack did not occur

The packed version pointed to by PackedVersionPtr is modified with the new packed version if the status indicates success.

Note

None.

◆ XVersion_ToString()

void XVersion_ToString ( XVersion *  InstancePtr,
char *  StringPtr 
)

#include <xversion.c>

Converts a version to a null terminated string.

Parameters
InstancePtrpoints to the version to convert.
StringPtrpoints to the string which will be the result of the conversion. This does not need to point to a null terminated string as an input, but must point to storage which is an adequate amount to hold the result string.
Returns

The null terminated string is inserted at the location pointed to by StringPtr if the status indicates success.

Note

It is necessary for the caller to have already allocated the storage to contain the string. The amount of memory necessary for the string is specified in the version header file.

◆ XVersion_UnPack()

void XVersion_UnPack ( XVersion *  InstancePtr,
u16  PackedVersion 
)

#include <xversion.c>

Unpacks a packed version into the specified version.

Versions are packed into the configuration ROM to reduce the amount storage. A packed version is a binary format as oppossed to a non-packed version which is implemented as a string.

Parameters
InstancePtrpoints to the version to unpack the packed version into.
PackedVersioncontains the packed version to unpack.
Returns
None.
Note
None.

Variable Documentation

◆ XAssertStatus [1/2]

unsigned int XAssertStatus

#include <xbasic_types.c>

This variable allows testing to be done easier with asserts.

An assert sets this variable such that a driver can evaluate this variable to determine if an assert occurred.

◆ XAssertStatus [2/2]

unsigned int XAssertStatus

#include <xbasic_types.h>

This variable allows testing to be done easier with asserts.

An assert sets this variable such that a driver can evaluate this variable to determine if an assert occurred.

◆ XWaitInAssert

int XWaitInAssert = TRUE

#include <xbasic_types.c>

This variable allows the assert functionality to be changed for testing such that it does not wait infinitely.

Use the debugger to disable the waiting during testing of asserts.