OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [tags/] [v0.0/] [sw/] [dev/] [test_main/] [src/] [_hdl/] [bsp/] [libsrc/] [axidma_v9_0/] [src/] [xdebug.h] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 kuzmi4
/******************************************************************************
2
*
3
* Copyright (C) 2010 - 2015 Xilinx, Inc.  All rights reserved.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy
6
* of this software and associated documentation files (the "Software"), to deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
* copies of the Software, and to permit persons to whom the Software is
10
* furnished to do so, subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice shall be included in
13
* all copies or substantial portions of the Software.
14
*
15
* Use of the Software is limited solely to applications:
16
* (a) running on a Xilinx device, or
17
* (b) that interact with a Xilinx device through a bus or interconnect.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22
* XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
* SOFTWARE.
26
*
27
* Except as contained in this notice, the name of the Xilinx shall not be used
28
* in advertising or otherwise to promote the sale, use or other dealings in
29
* this Software without prior written authorization from Xilinx.
30
*
31
******************************************************************************/
32
#ifndef _XDEBUG_H
33
#define _XDEBUG_H
34
 
35
#include "xil_printf.h"
36
#if defined(DEBUG) && !defined(NDEBUG)
37
 
38
#include <stdio.h>
39
 
40
#ifndef XDEBUG_WARNING
41
#define XDEBUG_WARNING
42
#warning DEBUG is enabled
43
#endif
44
 
45
#define XDBG_DEBUG_ERROR             0x00000001    /* error  condition messages */
46
#define XDBG_DEBUG_GENERAL           0x00000002    /* general debug  messages */
47
#define XDBG_DEBUG_ALL               0xFFFFFFFF    /* all debugging data */
48
 
49
#define XDBG_DEBUG_FIFO_REG          0x00000100    /* display register reads/writes */
50
#define XDBG_DEBUG_FIFO_RX           0x00000101    /* receive debug messages */
51
#define XDBG_DEBUG_FIFO_TX           0x00000102    /* transmit debug messages */
52
#define XDBG_DEBUG_FIFO_ALL          0x0000010F    /* all fifo debug messages */
53
 
54
#define XDBG_DEBUG_TEMAC_REG         0x00000400    /* display register reads/writes */
55
#define XDBG_DEBUG_TEMAC_RX          0x00000401    /* receive debug messages */
56
#define XDBG_DEBUG_TEMAC_TX          0x00000402    /* transmit debug messages */
57
#define XDBG_DEBUG_TEMAC_ALL         0x0000040F    /* all temac  debug messages */
58
 
59
#define XDBG_DEBUG_TEMAC_ADPT_RX     0x00000800    /* receive debug messages */
60
#define XDBG_DEBUG_TEMAC_ADPT_TX     0x00000801    /* transmit debug messages */
61
#define XDBG_DEBUG_TEMAC_ADPT_IOCTL  0x00000802    /* ioctl debug messages */
62
#define XDBG_DEBUG_TEMAC_ADPT_MISC   0x00000803    /* debug msg for other routines */
63
#define XDBG_DEBUG_TEMAC_ADPT_ALL    0x0000080F    /* all temac adapter debug messages */
64
 
65
#define xdbg_current_types (XDBG_DEBUG_ERROR)
66
 
67
#define xdbg_stmnt(x)  x
68
 
69
/* In VxWorks, if _WRS_GNU_VAR_MACROS is defined, special syntax is needed for
70
 * macros that accept variable number of arguments
71
 */
72
#if defined(XENV_VXWORKS) && defined(_WRS_GNU_VAR_MACROS)
73
#define xdbg_printf(type, args...) (((type) & xdbg_current_types) ? printf (## args) : 0)
74
 
75
#else /* ANSI Syntax */
76
 
77
#define xdbg_printf(type, ...) (((type) & xdbg_current_types) ? printf (__VA_ARGS__) : 0)
78
 
79
#endif
80
 
81
#else /* defined(DEBUG) && !defined(NDEBUG) */
82
 
83
#define xdbg_stmnt(x)
84
 
85
/* See VxWorks comments above */
86
#if defined(XENV_VXWORKS) && defined(_WRS_GNU_VAR_MACROS)
87
#define xdbg_printf(type, args...)
88
#else /* ANSI Syntax */
89
#define xdbg_printf(...)
90
#endif
91
 
92
#endif /* defined(DEBUG) && !defined(NDEBUG) */
93
 
94
#endif /* _XDEBUG_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.