1 /******************************************************************************
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
12 * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
13 * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
14 * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
15 * XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
16 * FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
17 * ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
18 * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
19 * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY
20 * WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM
21 * CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
22 * FITNESS FOR A PARTICULAR PURPOSE.
25 * Xilinx hardware products are not intended for use in life support
26 * appliances, devices, or systems. Use in such applications is
27 * expressly prohibited.
30 * (c) Copyright 2002-2004 Xilinx Inc.
31 * All rights reserved.
34 * You should have received a copy of the GNU General Public License along
35 * with this program; if not, write to the Free Software Foundation, Inc.,
36 * 675 Mass Ave, Cambridge, MA 02139, USA.
38 ******************************************************************************/
39 /*****************************************************************************
41 * This file contains the interface for the XVersion component. This
42 * component represents a version ID. It is encapsulated within a component
43 * so that it's type and implementation can change without affecting users of
46 * The version is formatted as X.YYZ where X = 0 - 9, Y = 00 - 99, Z = a - z
47 * X is the major revision, YY is the minor revision, and Z is the
48 * compatability revision.
50 * Packed versions are also utilized for the configuration ROM such that
51 * memory is minimized. A packed version consumes only 16 bits and is
52 * formatted as follows.
55 * Revision Range Bit Positions
57 * Major Revision 0 - 9 Bits 15 - 12
58 * Minor Revision 0 - 99 Bits 11 - 5
59 * Compatability Revision a - z Bits 4 - 0
62 ******************************************************************************/
64 #ifndef XVERSION_H /* prevent circular inclusions */
65 #define XVERSION_H /* by using protection macros */
67 /***************************** Include Files *********************************/
69 #include "xbasic_types.h"
72 /************************** Constant Definitions *****************************/
74 /**************************** Type Definitions *******************************/
76 /* the following data type is used to hold a null terminated version string
77 * consisting of the following format, "X.YYX"
79 typedef s8 XVersion[6];
81 /***************** Macros (Inline Functions) Definitions *********************/
83 /************************** Function Prototypes ******************************/
85 void XVersion_UnPack(XVersion * InstancePtr, u16 PackedVersion);
87 XStatus XVersion_Pack(XVersion * InstancePtr, u16 * PackedVersion);
89 u32 XVersion_IsEqual(XVersion * InstancePtr, XVersion * VersionPtr);
91 void XVersion_ToString(XVersion * InstancePtr, s8 * StringPtr);
93 XStatus XVersion_FromString(XVersion * InstancePtr, s8 * StringPtr);
95 void XVersion_Copy(XVersion * InstancePtr, XVersion * VersionPtr);
97 #endif /* end of protection macro */