|
#define | Xil_AssertVoid(Expression) |
| This assert macro is to be used for void functions. This in conjunction with the Xil_AssertWait boolean can be used to accommodate tests so that asserts which fail allow execution to continue. More...
|
|
#define | Xil_AssertNonvoid(Expression) |
| This assert macro is to be used for functions that do return a value. This in conjunction with the Xil_AssertWait boolean can be used to accommodate tests so that asserts which fail allow execution to continue. More...
|
|
#define | Xil_AssertVoidAlways() |
| Always assert. This assert macro is to be used for void functions. Use for instances where an assert should always occur. More...
|
|
#define | Xil_AssertNonvoidAlways() |
| 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. More...
|
|
|
void | XNullHandler (void *NullParameter) |
| 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. More...
|
|
void | Xil_AssertSetCallback (Xil_AssertCallback Routine) |
| Set up a callback function to be invoked when an assert occurs. If a callback is already installed, then it will be replaced. More...
|
|
void | Xil_Assert (const char8 *File, s32 Line) |
| Implement 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 Xil_AssertWait variable. More...
|
|
|
u32 | Xil_AssertStatus |
| 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.
|
|
s32 | Xil_AssertWait = 1 |
| 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.
|
|
The xil_assert.h file contains assert related functions and macros. Assert APIs/Macros specifies that a application program satisfies certain conditions at particular points in its execution. These function can be used by application programs to ensure that, application code is satisfying certain conditions.
MODIFICATION HISTORY:
Ver Who Date Changes
----- ---- -------- -------------------------------------------------------
1.00a hbm 07/14/09 First release
6.0 kvn 05/31/16 Make Xil_AsserWait a global variable
This file contains basic assert related functions for Xilinx software IP.
MODIFICATION HISTORY:
Ver Who Date Changes
----- ---- -------- -------------------------------------------------------
1.00a hbm 07/14/09 Initial release
6.0 kvn 05/31/16 Make Xil_AsserWait a global variable
◆ Xil_AssertNonvoid
#define Xil_AssertNonvoid |
( |
|
Expression | ) |
|
Value:{ \
if (Expression) { \
Xil_AssertStatus = XIL_ASSERT_NONE; \
} else { \
Xil_Assert(__FILE__, __LINE__); \
Xil_AssertStatus = XIL_ASSERT_OCCURRED; \
return 0; \
} \
}
This assert macro is to be used for functions that do return a value. This in conjunction with the Xil_AssertWait boolean can be used to accommodate tests so that asserts which fail allow execution to continue.
- Parameters
-
Expression | expression to be evaluated. If it evaluates to false, the assert occurs. |
- Returns
- Returns 0 unless the Xil_AssertWait variable is true, in which case no return is made and an infinite loop is entered.
◆ Xil_AssertNonvoidAlways
#define Xil_AssertNonvoidAlways |
( |
| ) |
|
Value:{ \
Xil_Assert(__FILE__, __LINE__); \
Xil_AssertStatus = XIL_ASSERT_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 Xil_AssertWait variable is true, in which case no return is made and an infinite loop is entered.
◆ Xil_AssertVoid
#define Xil_AssertVoid |
( |
|
Expression | ) |
|
Value:{ \
if (Expression) { \
Xil_AssertStatus = XIL_ASSERT_NONE; \
} else { \
Xil_Assert(__FILE__, __LINE__); \
Xil_AssertStatus = XIL_ASSERT_OCCURRED; \
return; \
} \
}
This assert macro is to be used for void functions. This in conjunction with the Xil_AssertWait boolean can be used to accommodate tests so that asserts which fail allow execution to continue.
- Parameters
-
Expression | expression to be evaluated. If it evaluates to false, the assert occurs. |
- Returns
- Returns void unless the Xil_AssertWait variable is true, in which case no return is made and an infinite loop is entered.
◆ Xil_AssertVoidAlways
#define Xil_AssertVoidAlways |
( |
| ) |
|
Value:{ \
Xil_Assert(__FILE__, __LINE__); \
Xil_AssertStatus = XIL_ASSERT_OCCURRED; \
return; \
}
Always assert. This assert macro is to be used for void functions. Use for instances where an assert should always occur.
- Returns
- Returns void unless the Xil_AssertWait variable is true, in which case no return is made and an infinite loop is entered.
◆ Xil_AssertCallback
typedef void(* Xil_AssertCallback) (const char8 *File, s32 Line) |
This data type defines a callback to be invoked when an assert occurs. The callback is invoked only when asserts are enabled
◆ Xil_Assert()
void Xil_Assert |
( |
const char8 * |
File, |
|
|
s32 |
Line |
|
) |
| |
Implement 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 Xil_AssertWait variable.
- Parameters
-
File | filename of the source |
Line | linenumber within File |
- Returns
- None.
- Note
- None.
◆ Xil_AssertSetCallback()
Set up a callback function to be invoked when an assert occurs. If a callback is already installed, then it will be replaced.
- Parameters
-
Routine | 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 | ) |
|
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
-
NullParameter | arbitrary void pointer and not used. |
- Returns
- None.
- Note
- None.